Change our menu building blocks to use PHP templates so that themes

can override them and define their own menu formats.  I worry a little
bit that this approach may be too heavy since we're now doing a lot
more template includes than we were before.  Also, I had to change the
Menu API to stop using __toString() because you can't throw exceptions
from __toString() which would make it an unhappy experience for
developers.
This commit is contained in:
Bharat Mediratta
2009-10-27 13:48:41 -07:00
parent ab1d21eb34
commit 76c0c7f3a1
7 changed files with 74 additions and 53 deletions
+1 -2
View File
@@ -47,8 +47,7 @@ class Admin_View_Core extends Gallery_View {
public function admin_menu() {
$menu = Menu::factory("root");
module::event("admin_menu", $menu, $this);
$menu->compact();
return $menu;
return $menu->compact()->render();
}
/**