Inheritance: implements Symfony\Component\DependencyInjection\ContainerAwareInterface
 public function setEntityById($id)
 {
     $entity = $this->em->getRepository('FRDCarBundle:Carro')->find($id);
     if (!$entity) {
         throw $this->container->createNotFoundException("Registro não encontrado");
     }
     $this->carro = $entity;
 }
 function __construct(Container $container, $parameters)
 {
     parent::setContainer($container);
     $this->mode = $parameters['paypal']['mode'];
     $this->logLevel = $parameters['paypal']['logLevel'];
     $this->generateUniqueId();
 }
 /**
  * @inheritdoc
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     foreach ($container->getParameter('fizz_import.batch') as $batch) {
         $this->register($batch['name'], $batch['class']);
     }
 }
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $Estabelecimento = new Estabelecimento();
     $Estabelecimento->setUserSecret('admin');
     $Estabelecimento->setUserKey('a');
     $Estabelecimento->setNome('a');
     $Estabelecimento->setEmail('admin');
     $encoder = $this->container->get('security.encoder_factory')->getEncoder($Estabelecimento);
     $Estabelecimento->setSenha($encoder->encodePassword('secret', $Estabelecimento->getSalt()));
     // $Estabelecimento->setSenha('test');
     $Estabelecimento->setCidade('a');
     $Estabelecimento->setLat(11);
     $Estabelecimento->setLng(12);
     $Estabelecimento->setIsActive(true);
     $manager->persist($Estabelecimento);
     $manager->flush();
 }
Exemple #5
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
 }
Exemple #6
0
 /**
  * {@inheritDoc}
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     if (null === $this->tools) {
         $this->tools = $this->initTools();
     }
 }
 /**
  * Sets the Container associated with this Controller.
  *
  * @param ContainerInterface $container A ContainerInterface instance
  *
  * @api
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     // Load settings.
     $this->settings = $this->container->getParameter('magento');
 }
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->registry = $this->container->get('doctrine');
 }
Exemple #9
0
 /**
  * {@inheritDoc}
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->calculateStrategy->setContainer($container);
 }