Ejemplo n.º 1
0
 /**
  * Deletes a model.
  *
  * @param mixed $model
  */
 public function remove($model)
 {
     $class = $this->manager->getClassMetadata(get_class($model));
     $managers = $class->getFieldManagerNames();
     $priority = $this->manager->getPool()->getPriority('transaction');
     foreach ($managers as $key => $managerName) {
         if (isset($priority[$managerName])) {
             $this->manager->remove($model);
             unset($managers[$key]);
             // dereference index
         }
     }
     foreach ($managers as $managerName) {
         $this->addQueue(self::QUEUE_ACTION_REMOVE, $managerName, $model);
     }
 }
Ejemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function remove($model)
 {
     self::throwIfInvalidModelArgumentException($model);
     parent::remove($model);
 }