コード例 #1
0
 /**
  * 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());
     }
 }
コード例 #2
0
 /**
  * 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);
 }