src/Subjects/BunchSubject.php
public function getRootCategoryStoreViewCodes($path)
    {

        // explode the path of the root category
        list ($rootCategoryPath, ) = explode('/', $path);

        // query whether or not a root category with the given path exists
        if ($rootCategory = $this->getCategoryByPath($rootCategoryPath)) {
            // initialize the array with the store view codes
            $storeViewCodes = array();

            // try to assemble the store view codes by iterating over the available root categories
            foreach ($this->rootCategories as $storeViewCode => $category) {
                // query whether or not the entity ID of the root category matches
                if ((integer) $category[$this->getPrimaryKeyMemberName()] === (integer) $rootCategory[$this->getPrimaryKeyMemberName()]) {
                    $storeViewCodes[] = $storeViewCode;
                }
            }

            // return the array with the store view codes
            return $storeViewCodes;
        }

        // throw an exception, if the root category is NOT available
        throw new \Exception(printf('Can\'t load root category "%s" for path "%s"', $rootCategoryPath, $path));
    }
public function getRootCategoryStoreViewCodes($path)
    {

        // explode the path of the root category
        list ($rootCategoryPath, ) = explode('/', $path);

        // query whether or not a root category with the given path exists
        if ($rootCategory = $this->getCategoryByPath($rootCategoryPath)) {
            // initialize the array with the store view codes
            $storeViewCodes = array();

            // try to assemble the store view codes by iterating over the available root categories
            foreach ($this->rootCategories as $storeViewCode => $category) {
                // query whether or not the entity ID of the root category matches
                if ((integer) $category[$this->getPrimaryKeyMemberName()] === (integer) $rootCategory[$this->getPrimaryKeyMemberName()]) {
                    $storeViewCodes[] = $storeViewCode;
                }
            }

            // return the array with the store view codes
            return $storeViewCodes;
        }

        // throw an exception, if the root category is NOT available
        throw new \Exception(printf('Can\'t load root category "%s" for path "%s"', $rootCategoryPath, $path));
    }
public function getRootCategoryStoreViewCodes ( $ path ) { // explode the path of the root category list ( $ rootCategoryPath , ) = explode ( '/' , $ path ) ; // query whether or not a root category with the given path exists if ( $ rootCategory = $ this -> getCategoryByPath ( $ rootCategoryPath ) ) { // initialize the array with the store view codes $ storeViewCodes = array ( ) ; // try to assemble the store view codes by iterating over the available root categories foreach ( $ this -> rootCategories as $ storeViewCode => $ category ) { // query whether or not the entity ID of the root category matches if ( ( integer ) $ category [ $ this -> getPrimaryKeyMemberName ( ) ] === ( integer ) $ rootCategory [ $ this -> getPrimaryKeyMemberName ( ) ] ) { $ storeViewCodes [ ] = $ storeViewCode ; } } // return the array with the store view codes return $ storeViewCodes ; } // throw an exception, if the root category is NOT available throw new \ Exception ( printf ( 'Can\'t load root category "%s" for path "%s"' , $ rootCategoryPath , $ path ) ) ; }
Returns the store view codes relevant to the category represented by the current row.

@param string $path The path to return the root category's store view codes for

@return array The store view codes for the given root category
@throws \Exception Is thrown, if the root category of the passed path is NOT available
Returns the store view codes relevant to the category represented by the current row .