12 $cacheId = $this->createCacheKey();
14 if ($this->beginCache($cacheId, array(
'duration' => Yii::app()->getModule(
'navigation')->cacheTime))) {
16 $data = $tree->cleanUp(Yii::app()->user->id, $this->usePersonalisation);
19 if ($this->hideFirstLevel && !empty($data[
'children'])) {
20 $fakeChildren = array();
21 foreach ($data[
'children'] as &$node) {
22 if (!empty($node[
'children']) && in_array($node[
'contentid'], $this->activePath)) {
23 $fakeChildren = array_merge($fakeChildren, $node[
'children']);
28 if (!empty($fakeChildren)) {
29 $this->render(
'_branch', array(
'branch' => $fakeChildren,
'lvl' => 1));
32 }
else if (!empty($data[
'children'])) {
33 $this->render(
'_branch', array(
'branch' => $data[
'children'],
'lvl' => 1));