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

remove() public méthode

Removes an object from this repository.
public remove ( object $object ) : void
$object object The object to remove
Résultat void
    public function remove($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 remove() was ' . $type . ' , however the ' . get_class($this) . ' can only handle ' . $this->entityClassName . ' instances.', 1298403442);
        }
        $this->persistenceManager->remove($object);
    }

Usage Example

 /**
  * Removes an account
  *
  * @param object $object The account to remove
  * @return void
  * @throws IllegalObjectTypeException
  */
 public function remove($object)
 {
     parent::remove($object);
     /** @var Account $object */
     $tag = 'TYPO3-Flow-Security-Account-' . md5($object->getAccountIdentifier());
     $this->sessionManager->destroySessionsByTag($tag, sprintf('The account %s (%s) was deleted', $object->getAccountIdentifier(), $object->getAuthenticationProviderName()));
 }
All Usage Examples Of Neos\Flow\Persistence\Repository::remove