FuelPHP Bin
<?php /** * @package Exite Application Framework * @version 1.0 * @author Harro Verton * @copyright 2013 - Exite BV * @link http://exite.eu * @license CC BY-NC-ND 3.0, http://creativecommons.org/licenses/by-nc-nd/3.0/ */ namespace Content\Controller; class Linkset extends \Modules\Widget { /** * */ public function action_navigation($name, $depth) { // get the linkset root $linkset = \Content\Model\Linkset::get_linkset($name); // found it? if ($linkset) { try { $linkset = \Cache::get('content.linkset-'.$linkset->id.'.tree'); } catch (\CacheNotFoundException $e) { $linkset = $linkset->dump_tree(true); \Cache::set('content.linkset-'.$linkset->id.'.tree', $linkset); } } else { throw new \Exception('linkset "'.$linkset.'" not found'); } return \Theme::instance()->view('linkset/navigation')->set(array( 'linkset' => $linkset, 'max_depth' => $depth, 'current_uri' => \Uri::create(\Request::main()->uri->get() ?: '/'), )); } }