Inheritance: implements Symfony\Component\DependencyInjection\ContainerAwareInterface
Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 function __construct(Container $container, $parameters)
 {
     parent::setContainer($container);
     $this->mode = $parameters['paypal']['mode'];
     $this->logLevel = $parameters['paypal']['logLevel'];
     $this->generateUniqueId();
 }
Exemplo n.º 3
0
 /**
  * @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();
 }
Exemplo n.º 5
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
 }
Exemplo n.º 6
0
 /**
  * {@inheritDoc}
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     if (null === $this->tools) {
         $this->tools = $this->initTools();
     }
 }
Exemplo n.º 7
0
 /**
  * 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');
 }
Exemplo n.º 8
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->registry = $this->container->get('doctrine');
 }
Exemplo n.º 9
0
 /**
  * {@inheritDoc}
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->calculateStrategy->setContainer($container);
 }