public function decorateConfiguration(\Mmi\Navigation\NavigationConfig $config)
    {
        $objectArray = (new CmsCategoryQuery)
            ->lang()
            ->andFieldStatus()->equals(\Cms\Orm\CmsCategoryRecord::STATUS_ACTIVE)
            ->orderAscParentId()
            ->orderAscOrder()
            ->find()
            ->toObjectArray();
        foreach ($objectArray as $key => $record) {/* @var $record CmsCategoryRecord */
            if ($record->parentId != 0) {
                continue;
            }
            $element = new \Mmi\Navigation\NavigationConfigElement($record->uri);
            $this->_setNavigationElementFromRecord($record, $element);
            $config->addElement($element);
            unset($objectArray[$key]);
            $this->_buildChildren($record, $element, $objectArray);
        }
    }
public function decorateConfiguration(\Mmi\Navigation\NavigationConfig $config)
    {
        $objectArray = (new CmsCategoryQuery)
            ->lang()
            ->andFieldStatus()->equals(\Cms\Orm\CmsCategoryRecord::STATUS_ACTIVE)
            ->orderAscParentId()
            ->orderAscOrder()
            ->find()
            ->toObjectArray();
        foreach ($objectArray as $key => $record) {/* @var $record CmsCategoryRecord */
            if ($record->parentId != 0) {
                continue;
            }
            $element = new \Mmi\Navigation\NavigationConfigElement($record->uri);
            $this->_setNavigationElementFromRecord($record, $element);
            $config->addElement($element);
            unset($objectArray[$key]);
            $this->_buildChildren($record, $element, $objectArray);
        }
    }
public function decorateConfiguration ( \ Mmi \ Navigation \ NavigationConfig $ config ) { $ objectArray = ( new CmsCategoryQuery ) -> lang ( ) -> andFieldStatus ( ) -> equals ( \ Cms \ Orm \ CmsCategoryRecord :: STATUS_ACTIVE ) -> orderAscParentId ( ) -> orderAscOrder ( ) -> find ( ) -> toObjectArray ( ) ; foreach ( $ objectArray as $ key => $ record ) { /* @var $record CmsCategoryRecord */ if ( $ record -> parentId != 0 ) { continue ; } $ element = new \ Mmi \ Navigation \ NavigationConfigElement ( $ record -> uri ) ; $ this -> _setNavigationElementFromRecord ( $ record , $ element ) ; $ config -> addElement ( $ element ) ; unset ( $ objectArray [ $ key ] ) ; $ this -> _buildChildren ( $ record , $ element , $ objectArray ) ; } }
Dodaje do konfiguracji dane z bazy danych
@param \Mmi\Navigation\NavigationConfig $config
Dodaje do konfiguracji dane z bazy danych