protected function CreateAfterUrl()
 {
     $args = array('navigation' => $this->navigation->GetID());
     $args['previous'] = $this->item->GetID();
     $parent = $this->item->GetParent();
     if ($parent) {
         $args['parent'] = $parent->GetID();
     }
     return BackendRouter::ModuleUrl(new NavigationItemForm(), $args);
 }
 /**
  * 
  * Gets the top most navigation item
  * @return NavigationItem
  */
 public function TopMost()
 {
     $tblNavItem = NavigationItem::Schema()->Table();
     $sql = Access::SqlBuilder();
     $where = $sql->Equals($tblNavItem->Field('Navigation'), $sql->Value($this->navi->GetID()))->And_($sql->IsNull($tblNavItem->Field('Parent')))->And_($sql->IsNull($tblNavItem->Field('Previous')));
     return NavigationItem::Schema()->First($where);
 }
 protected function AfterSave()
 {
     $params = array('navigation' => $this->navi->GetID());
     Response::Redirect(BackendRouter::ModuleUrl(new NavigationTree(), $params));
 }
示例#4
0
 public function BackendName()
 {
     $result = 'navigation';
     if (!$this->content) {
         return $result;
     }
     $navi = ContentNavigation::Schema()->ByContent($this->content);
     return $result . ' ' . $navi->GetName();
 }
 protected function BackLink()
 {
     return BackendRouter::ContentTreeUrl($this->navigation->GetContent());
 }