Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
NavigationWidget Class Reference
Inheritance diagram for NavigationWidget:
BaseJuiWidget

Public Member Functions

 init ()
 run ()
 registerAssets ()
 createCacheKey ()
- Public Member Functions inherited from BaseJuiWidget
 getViewFile ($viewName)

Public Attributes

 $startfolderId = 0
 $activeElement = 0
 $isSitemap = false
 $isBreadcrumb = false
 $cssClass = 'navigation'
 $maxLvl = 0
 $lang = ''
 $activePath = array()
 $hideFirstLevel = false
 $usePersonalisation = true
 $additionalParams = array()
 $sortby = "sortorder:asc"

Detailed Description

Gentics Portal.Node PHP Author & Copyright (c) by Gentics Software GmbH sales.nosp@m.@gen.nosp@m.tics..nosp@m.com http://www.gentics.com Licenses can be found in the LICENSE.txt file in the root-folder of this installation You must not use this software without a valid license agreement.

Widget for viewing navigation tree

Definition at line 13 of file NavigationWidget.php.

Member Function Documentation

NavigationWidget::createCacheKey ( )

Registers assets

Returns
string

Definition at line 129 of file NavigationWidget.php.

References PersonalisationAttribute\flatListForUser(), and NavigationTree\getUpdatetimestampByContentId().

{
$key = 'startfolderId='.$this->startfolderId;
$key .= 'activeElement='.$this->activeElement;
$key .= 'isSitemap='.$this->isSitemap;
$key .= 'cssClass='.$this->cssClass;
$key .= 'maxLvl='.$this->maxLvl;
$key .= 'lang='.$this->lang;
$key .= 'hideFirstLevel='.$this->hideFirstLevel;
$key .= 'usePersonalisation='.(int)$this->usePersonalisation;
$key .= NavigationTree::getUpdatetimestampByContentId($this->startfolderId).serialize(PersonalisationAttribute::flatListForUser(intval(Yii::app()->user->id)));
return md5($key);
}
NavigationWidget::init ( )

Initializes the widget.

Returns
void

Definition at line 89 of file NavigationWidget.php.

{
//die('this is init');
}
NavigationWidget::registerAssets ( )

Registers assets

Returns
void

Definition at line 115 of file NavigationWidget.php.

{
$cs = Yii::app()->getClientScript();
$baseUrl = Yii::app()->getModule('navigation')->getAssetsUrl();
//$cs->registerScriptFile($likeBaseUrl . '/js/navigation.js');
$cs->registerCssFile($baseUrl . '/css/navigation.css');
}
NavigationWidget::run ( )

renders view

Returns
void

Definition at line 99 of file NavigationWidget.php.

{
$tree = new NavigationTree($this->startfolderId, $this->activeElement, $this->additionalParams, $this->sortby);
if ($tree->data) {
$this->activePath = $tree->activePath;
$this->lang = substr(Yii::app()->language, 0, 2);
//$this->registerAssets();
$this->render('NavigationWidget', array('tree'=>$tree));
}
}

Member Data Documentation

NavigationWidget::$activeElement = 0

id of the root folder for current widget

Definition at line 25 of file NavigationWidget.php.

NavigationWidget::$activePath = array()

Contains array with ids of opened folders

Definition at line 61 of file NavigationWidget.php.


The documentation for this class was generated from the following file: