Jackalope\Item::setDeleted PHP Method

setDeleted() public method

Tell this item it has been deleted and cannot be used anymore
public setDeleted ( )
    public function setDeleted()
    {
        $this->setState(self::STATE_DELETED);
    }

Usage Example

Example #1
0
 /**
  * In addition to set this item deleted, set all properties to deleted.
  *
  * They will be automatically deleted by the backend, but the user might
  * still have a reference to one of the property objects.
  *
  * @private
  */
 public function setDeleted()
 {
     parent::setDeleted();
     foreach ($this->properties as $property) {
         $property->setDeleted();
         // not all properties are tracked in objectmanager
     }
 }