/** * Adds the route function to twig templating language * * @return void * @author Dan Cox */ private function _function_Route() { return new \Twig_SimpleFunction('Route', function ($page, $params = array()) { return URL::route($page, $params); }); }
/** * Add Route - used to get the Url from route name, chainable. * * @param $name string * @return object * @author Dan Cox */ public function addRoute($name, $params = array()) { // Save the generated url to the route; $this->route = URL::route($name, $params); return $this; }