public function __construct(ContainerInterface $container) { parent::__construct($container); $Repository = $container->get('doctrine')->getManager()->getRepository('ProshutAttachmentBundle:Attachment'); $Result = $Repository->createQueryBuilder('a')->select('a.mime')->groupBy('a.mime')->getQuery()->getResult(); if ($Result) { foreach ($Result as $Mime) { $this->Choice['mime'][$Mime['mime']] = ucfirst(str_replace("/", " :: ", $Mime['mime'])); } } }
public function __construct(ContainerInterface $container) { parent::__construct($container); }