remove() public method

public remove ( $object )
Ejemplo n.º 1
0
 /**
  * @param object $object
  * @throws \TYPO3\Flow\Persistence\Exception\IllegalObjectTypeException
  * @return void
  */
 public function remove($object)
 {
     if (!is_object($object) || !$object instanceof $this->entityClassName) {
         $type = is_object($object) ? get_class($object) : gettype($object);
         throw new \TYPO3\Flow\Persistence\Exception\IllegalObjectTypeException('The value given to remove() was ' . $type . ' , however the ' . get_class($this) . ' can only handle ' . $this->entityClassName . ' instances.', 1298403442);
     }
     $this->documentManager->remove($object);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function deleteUser(UserInterface $user)
 {
     $this->dm->remove($user);
     $this->dm->flush();
 }
Ejemplo n.º 3
0
 /**
  * Deletes a group.
  *
  * @param GroupInterface $group
  * @return void
  */
 public function deleteGroup(GroupInterface $group)
 {
     $this->dm->remove($group);
     $this->dm->flush();
 }