Ejemplo n.º 1
0
 /**
  * True if there can be content created after
  * @return boolean
  */
 protected final function CanCreateAfter()
 {
     $parentItem = $this->tree->ParentOf($this->item);
     if ($parentItem) {
         $parent = $this->tree->ContentByItem($parentItem);
         return BackendModule::Guard()->Allow(BackendAction::Create(), $parent);
     }
     return $this->GrantCreateInRoot()->ToBool();
 }
Ejemplo n.º 2
0
 /**
  * Removes the item
  * @param mixed $item
  */
 function Remove($item)
 {
     $prev = $this->provider->PreviousOf($item);
     $next = $this->provider->NextOf($item);
     if ($next) {
         $this->provider->SetPrevious($next, $prev);
     }
     $this->provider->Delete($item);
     if ($next) {
         $this->provider->Save($next);
     }
 }