Jackalope\Item::confirmSaved PHP Method

confirmSaved() public method

allowing it to clear the modified / new flags
public confirmSaved ( )
    public function confirmSaved()
    {
        $this->oldPath = null;
        // in case this item has been moved
        $this->setDirty(false, self::STATE_CLEAN);
    }

Usage Example

示例#1
0
 /**
  * In addition to calling parent method, tell all properties and clean deletedProperties
  */
 public function confirmSaved()
 {
     foreach ($this->properties as $property) {
         if ($property->isModified() || $property->isNew()) {
             $property->confirmSaved();
         }
     }
     $this->deletedProperties = array();
     parent::confirmSaved();
 }