/** * Delete the Taggings of this entity * * @param LifecycleEventArgs $args */ public function preRemove(LifecycleEventArgs $args) { $entity = $args->getObject(); // If it's a Taggable entity, delete the tags if ($this->isEntitySupported($this->getReflClass($entity))) { $this->tagManager->deleteTagging($args->getObject()); } }
/** * Get the Choice List * * @param $options * @return EntityChoiceList */ protected function getChoiceList($options) { $loader = $this->getEntityLoader($options); return new EntityChoiceList($this->tagManager->getEm(), $options['class'], null, $loader); }