protected function Init() { $this->navi = new ContentNavigation(Request::GetData('navigation')); $this->naviTree = new NavigationTreeProvider($this->navi); $this->tree = new TreeBuilder($this->naviTree); $this->naviItem = new NavigationItem(Request::GetData('item')); if (Request::GetData('previous')) { $this->previous = NavigationItem::Schema()->ByID(Request::GetData('previous')); } if (Request::GetData('parent')) { $this->parent = NavigationItem::Schema()->ByID(Request::GetData('parent')); } $this->AddTypeField(); $this->AddNameField(); $this->AddPageItemSelector(); //$this->AddPageField(); //$this->AddParametersField(); $this->AddUrlField(); $this->AddSubmit(); return parent::Init(); }
/** * * 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 TableSchema() { return NavigationItem::Schema(); }