Nextras\Orm\Entity\IEntity::setAsModified PHP Méthode

setAsModified() public méthode

Sets the entity or the column as modified.
public setAsModified ( string $name = null ) : self
$name string
Résultat self
    public function setAsModified($name = null);

Usage Example

 /**
  * @param IEntity          $entity
  * @param PropertyMetadata $propertyMetadata
  */
 public function __construct(IEntity $entity, PropertyMetadata $propertyMetadata)
 {
     $this->setModified = function () use($entity, $propertyMetadata) {
         $entity->setAsModified($propertyMetadata->name);
     };
 }