Пример #1
0
 public function addRoute($url, $type = null, $data = null, $priority = 0, $enabled = true)
 {
     $this->routesChanged = true;
     $p = new Route($url, $data, $priority);
     $p->page = $type ? $type : $this->defaultPageType;
     $p->module = $this;
     $p->enabled = $enabled;
     $this->routes[] = $p;
     $p->init();
     return $p;
 }
Пример #2
0
 public function addRouteLink($title, Route $route, $arguments = null, AccessRule $accessRule = null, $config = array())
 {
     $this->_links[] = array_merge(array('type' => 'url', 'route' => $route, 'url' => $route->getUrl($arguments), 'access' => $accessRule, 'title' => $title), $config);
 }