Exemple #1
0
 /**
  * True if page can be appended
  * @param Page $page The page before
  * @return bool
  */
 protected function CanCreateAfter()
 {
     $parent = $this->tree->ParentOf($this->page);
     if ($parent) {
         return BackendModule::Guard()->Allow(BackendAction::Create(), $parent);
     }
     return BackendModule::Guard()->GrantAddPageToSite($this->page->GetSite())->ToBool();
 }
 protected function ParentID()
 {
     $parent = $this->tree->ParentOf($this->page);
     return $parent ? $parent->GetID() : '0';
 }