src/Assembler/CategoryAssembler.php
public function getCategoryByPkAndStoreId($pk, $storeId)
    {

        // load the category with the passed path
        if ($category = $this->categoryRepository->load($pk)) {
            // load the category's attribute values for the passed PK and store ID
            $attributes = $this->categoryAttributeAssembler->getCategoryAttributesByPrimaryKeyAndStoreIdExtendedWithAttributeCode($pk, $storeId);

            // assemble the category withe the attributes
            foreach ($attributes as $attribute) {
                $category[$attribute[MemberNames::ATTRIBUTE_CODE]] = $attribute[MemberNames::VALUE];
            }

            // return the category assembled with the values for the given store ID
            return $category;
        }
    }
public function getCategoryByPkAndStoreId($pk, $storeId)
    {

        // load the category with the passed path
        if ($category = $this->categoryRepository->load($pk)) {
            // load the category's attribute values for the passed PK and store ID
            $attributes = $this->categoryAttributeAssembler->getCategoryAttributesByPrimaryKeyAndStoreIdExtendedWithAttributeCode($pk, $storeId);

            // assemble the category withe the attributes
            foreach ($attributes as $attribute) {
                $category[$attribute[MemberNames::ATTRIBUTE_CODE]] = $attribute[MemberNames::VALUE];
            }

            // return the category assembled with the values for the given store ID
            return $category;
        }
    }
public function getCategoryByPkAndStoreId ( $ pk , $ storeId ) { // load the category with the passed path if ( $ category = $ this -> categoryRepository -> load ( $ pk ) ) { // load the category's attribute values for the passed PK and store ID $ attributes = $ this -> categoryAttributeAssembler -> getCategoryAttributesByPrimaryKeyAndStoreIdExtendedWithAttributeCode ( $ pk , $ storeId ) ; // assemble the category withe the attributes foreach ( $ attributes as $ attribute ) { $ category [ $ attribute [ MemberNames :: ATTRIBUTE_CODE ] ] = $ attribute [ MemberNames :: VALUE ] ; } // return the category assembled with the values for the given store ID return $ category ; } }
Returns the category with the passed primary key and the attribute values for the passed store ID.

@param string  $pk      The primary key of the category to return
@param integer $storeId The store ID of the category values

@return array|null The category data
Returns the category with the passed primary key and the attribute values for the passed store ID .