src/Observers/AttributeObserverTrait.php
/**
     * Prepare the attributes of the entity that has to be persisted.
     *
     * @return array|null The prepared attributes
     */
Prepare the attributes of the entity that has to be persisted.
@return array|null The prepared attributes
Prepare the attributes of the entity that has to be persisted . @return array|null The prepared attributes
protected function prepareAttributes()
    {
        $lastEntityId = $this->getPrimaryKey();
        $storeId = $this->getRowStoreId(StoreViewCodes::ADMIN);
        return $this->initializeEntity(
            $this->loadRawEntity(
                array(
                   $this->getPrimaryKeyMemberName() => $lastEntityId,
                    MemberNames::ATTRIBUTE_ID       => $this->attributeId,
                    MemberNames::STORE_ID           => $storeId
                )
            )
        );
    }
protected function prepareAttributes ( ) { $ lastEntityId = $ this -> getPrimaryKey ( ) ; $ storeId = $ this -> getRowStoreId ( StoreViewCodes :: ADMIN ) ; return $ this -> initializeEntity ( $ this -> loadRawEntity ( array ( $ this -> getPrimaryKeyMemberName ( ) => $ lastEntityId , MemberNames :: ATTRIBUTE_ID => $ this -> attributeId , MemberNames :: STORE_ID => $ storeId ) ) ) ; }
Prepare the attributes of the entity that has to be persisted.
Prepare the attributes of the entity that has to be persisted .
// load the ID of the product that has been created recently // load the store ID, use the admin store if NO store view code has been set // prepare the attribute values