Changeset 1064:0c887ef58692 for inc/admin/class.dc.admincontext.php
- Timestamp:
- 12/13/12 08:48:15 (13 years ago)
- Branch:
- twig
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/class.dc.admincontext.php
r1061 r1064 117 117 { 118 118 return array( 119 '__' => new Twig_Function_Function("__", array('is_safe' => array('html'))) ,120 'page_menu' => new Twig_Function_Method($this, 'pageMenu', array('is_safe' => array('html')))119 '__' => new Twig_Function_Function("__", array('is_safe' => array('html'))) 120 //,'page_menu' => new Twig_Function_Method($this, 'pageMenu', array('is_safe' => array('html'))) 121 121 ); 122 122 } … … 134 134 $this->getCurrentBlog(); 135 135 $this->getCurrentUser(); 136 $this->getMenus(); 136 137 137 138 # Additional globals … … 200 201 { 201 202 $this->protected_globals['page_title'] = $title; 202 }203 204 /**205 pageMenu206 */207 public function pageMenu()208 {209 $menu =& $GLOBALS['_menu'];210 foreach ($menu as $k => $v) {211 echo $menu[$k]->draw();212 }213 203 } 214 204 … … 308 298 ); 309 299 } 300 301 protected function getMenus() 302 { 303 global $_menu; 304 305 $this->protected_globals['menus'] = array(); 306 307 if (!isset($_menu)) { 308 return; 309 } 310 311 foreach($_menu as $m) { 312 $this->protected_globals['menus'][] = array( 313 'id' => $m->getID(), 314 'title' => $m->getTitle(), 315 'separator' => $m->getSeparator(), 316 'items' => $m->getItems() 317 ); 318 } 319 } 310 320 } 311 321 ?>
Note: See TracChangeset
for help on using the changeset viewer.