protected function initializeAttribute(array $attr)
    {

        // load the entity type ID for the value from the system configuration
        $entityTypeId = $this->getEntityTypeId();

        // initialize the data to load the EAV attribute option
        $value = $this->getValue(ColumnKeys::VALUE);
        $storeId = $this->getRowStoreId(StoreViewCodes::ADMIN);
        $attributeCode = $this->getValue(ColumnKeys::ATTRIBUTE_CODE);

        // try to load the EAV attribute option
        if ($attributeOption = $this->loadAttributeOptionByEntityTypeIdAndAttributeCodeAndStoreIdAndValue($entityTypeId, $attributeCode, $storeId, $value)) {
            return $this->mergeEntity($attributeOption, $attr);
        }

        // simply return the attributes
        return $attr;
    }
protected function initializeAttribute(array $attr)
    {

        // load the entity type ID for the value from the system configuration
        $entityTypeId = $this->getEntityTypeId();

        // initialize the data to load the EAV attribute option
        $value = $this->getValue(ColumnKeys::VALUE);
        $storeId = $this->getRowStoreId(StoreViewCodes::ADMIN);
        $attributeCode = $this->getValue(ColumnKeys::ATTRIBUTE_CODE);

        // try to load the EAV attribute option
        if ($attributeOption = $this->loadAttributeOptionByEntityTypeIdAndAttributeCodeAndStoreIdAndValue($entityTypeId, $attributeCode, $storeId, $value)) {
            return $this->mergeEntity($attributeOption, $attr);
        }

        // simply return the attributes
        return $attr;
    }
protected function initializeAttribute ( array $ attr ) { // load the entity type ID for the value from the system configuration $ entityTypeId = $ this -> getEntityTypeId ( ) ; // initialize the data to load the EAV attribute option $ value = $ this -> getValue ( ColumnKeys :: VALUE ) ; $ storeId = $ this -> getRowStoreId ( StoreViewCodes :: ADMIN ) ; $ attributeCode = $ this -> getValue ( ColumnKeys :: ATTRIBUTE_CODE ) ; // try to load the EAV attribute option if ( $ attributeOption = $ this -> loadAttributeOptionByEntityTypeIdAndAttributeCodeAndStoreIdAndValue ( $ entityTypeId , $ attributeCode , $ storeId , $ value ) ) { return $ this -> mergeEntity ( $ attributeOption , $ attr ) ; } // simply return the attributes return $ attr ; }
Initialize the EAV attribute option with the passed attributes and returns an instance.

@param array $attr The EAV attribute option attributes

@return array The initialized EAV attribute option
Initialize the EAV attribute option with the passed attributes and returns an instance .