public function getRootCategory()
    {

        // load the actual store view code
        $storeViewCode = $this->getStoreViewCode($this->getDefaultStoreViewCode());

        // query weather or not we've a root category or not
        if (isset($this->rootCategories[$storeViewCode])) {
            return $this->rootCategories[$storeViewCode];
        }

        // throw an exception if the root category is NOT available
        throw new \Exception(sprintf('Root category for %s is not available', $storeViewCode));
    }
public function getRootCategory()
    {

        // load the actual store view code
        $storeViewCode = $this->getStoreViewCode($this->getDefaultStoreViewCode());

        // query weather or not we've a root category or not
        if (isset($this->rootCategories[$storeViewCode])) {
            return $this->rootCategories[$storeViewCode];
        }

        // throw an exception if the root category is NOT available
        throw new \Exception(sprintf('Root category for %s is not available', $storeViewCode));
    }
public function getRootCategory ( ) { // load the actual store view code $ storeViewCode = $ this -> getStoreViewCode ( $ this -> getDefaultStoreViewCode ( ) ) ; // query weather or not we've a root category or not if ( isset ( $ this -> rootCategories [ $ storeViewCode ] ) ) { return $ this -> rootCategories [ $ storeViewCode ] ; } // throw an exception if the root category is NOT available throw new \ Exception ( sprintf ( 'Root category for %s is not available' , $ storeViewCode ) ) ; }
Return's the root category for the actual view store.

@return array The store's root category
@throws \Exception Is thrown if the root category for the passed store code is NOT available
Return s the root category for the actual view store .