/**
  * @param mixed $value
  * @return object
  */
 private function singleReverseTransform($value)
 {
     return $this->admin->findEntity($value);
 }
Example #2
0
 /**
  * Generate a flash message for the provided admin and entity
  *
  * @param string $type
  * @param string $message
  * @param ContentAdmin $admin
  * @param object $entity
  * @param string $domain
  * @return array
  * @deprecated Use buildEntityFlash instead
  */
 protected function buildModalEntityFlash($type, $message, ContentAdmin $admin, $entity, $domain = 'LeaptAdminBundle')
 {
     return array($type => array($this->get('translator')->trans($message, array('%type%' => $this->get('translator')->transChoice($admin->getOption('label'), 1, array(), $this->get('leapt_admin')->getDefaultTranslationDomain()), '%name%' => $admin->getEntityName($entity))), $domain));
 }