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);
 }
 protected function CreateFormUrl()
 {
     $module = new NavigationItemForm();
     $args = array('navigation' => $this->navigation->GetID());
     return BackendRouter::ModuleUrl($module, $args);
     /*
             $module = new PageForm();
             $args = array('site' => $this->site->GetID());
             return BackendRouter::ModuleUrl($module, $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));
 }