Neos\Flow\Persistence\Repository::update PHP Méthode

update() public méthode

Schedules a modified object for persistence.
public update ( object $object )
$object object The modified object
    public function update($object)
    {
        if (!is_object($object) || !$object instanceof $this->entityClassName) {
            $type = is_object($object) ? get_class($object) : gettype($object);
            throw new IllegalObjectTypeException('The value given to update() was ' . $type . ' , however the ' . get_class($this) . ' can only store ' . $this->entityClassName . ' instances.', 1249479625);
        }
        $this->persistenceManager->update($object);
    }

Usage Example

 /**
  * @param AssetInterface $object
  */
 public function update($object)
 {
     parent::update($object);
     $this->assetService->emitAssetUpdated($object);
 }