setDirty() public method

Tell this item that it is dirty and needs to be refreshed
public setDirty ( boolean $keepChanges = false, $targetState = false )
$keepChanges boolean whether to keep changes when reloading or not
Example #1
0
 /**
  * Overwrite to set the properties dirty as well.
  *
  * @private
  */
 public function setDirty($keepChanges = false, $targetState = false)
 {
     parent::setDirty($keepChanges, $targetState);
     foreach ($this->properties as $property) {
         if ($keepChanges && self::STATE_NEW !== $property->getState()) {
             // if we want to keep changes, we do not want to set new properties dirty.
             $property->setDirty($keepChanges, $targetState);
         }
     }
 }