Esempio n. 1
0
 /**
  * Check if self registration is allowed.
  *
  * setContainer is called after controller creation is used to deny access to controller if self registration has
  * been disabled.
  */
 public function setContainer(ContainerInterface $container = NULL)
 {
     parent::setContainer($container);
     if (!$this->container->getParameter('fom_user.selfregister')) {
         throw new AccessDeniedHttpException();
     }
 }
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $options = $this->container->getParameter('hyperbolaa_ueditor');
     $this->http_max_age = $options['http_max_age'];
     $this->https_max_age = $options['https_max_age'];
 }
Esempio n. 3
0
 /**
  * Check if password reset is allowed.
  *
  * setContainer is called after controller creation is used to deny access to controller if password reset has
  * been disabled.
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     if (!$this->container->getParameter('fom_user.reset_password')) {
         throw new AccessDeniedHttpException();
     }
 }
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $options = $this->container->getParameter('bushidoio_qrcode');
     $this->http_max_age = $options['http_max_age'];
     $this->https_max_age = $options['https_max_age'];
 }
Esempio n. 5
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->translator = $container->get('translator');
     if (method_exists($this, 'init')) {
         $this->init();
     }
 }
Esempio n. 6
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->api = $this->get('wealthbot_docusign.api_client');
     $this->signatureManager = $this->get('wealthbot_docusign.document_signature.manager');
     $this->electronicSignature = $this->get('wealthbot_docusign.electronic_signature_service');
     $this->em = $this->get('doctrine.orm.entity_manager');
 }
Esempio n. 7
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->jarves = $this->container->get('jarves');
     $this->localFilesystem = $this->container->get('jarves.filesystem.local');
     $this->rootDir = $this->container->getParameter('kernel.root_dir');
     $this->utils = $this->container->get('jarves.utils');
 }
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     if (!$this->container->has('doctrine.orm.entity_manager')) {
         throw new InvalidConfigurationException();
     }
     $this->em = $this->container->get('doctrine.orm.entity_manager');
 }
Esempio n. 9
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->pageStack = $this->get('jarves.page_stack');
     $this->jarves = $this->get('jarves');
     $this->acl = $this->get('jarves.acl');
     $this->utils = $this->get('jarves.utils');
 }
Esempio n. 10
0
 /**
  * Overwritten to ensure to have a service container
  *
  * @param ContainerInterface $container
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     if (is_null($container)) {
         $this->serializer = null;
     } else {
         $this->serializer = $this->get('jms_serializer');
     }
 }
Esempio n. 11
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->jarves = $this->get('jarves');
     $this->localFilesystem = $this->get('jarves.filesystem.local');
     $this->objects = $this->get('jarves.objects');
     $this->utils = $this->get('jarves.utils');
     $this->configurationOperator = $this->get('jarves.configuration_operator');
 }
Esempio n. 12
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->jarves = $this->get('jarves');
     $this->pageStack = $this->get('jarves.page_stack');
     $this->translator = $this->get('jarves.translator');
     $this->webFilesystem = $this->get('jarves.filesystem.web');
     $this->templating = $this->get('templating');
 }
Esempio n. 13
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->jarves = $this->container->get('jarves');
     $this->pageStack = $this->container->get('jarves.page_stack');
     $this->objects = $this->container->get('jarves.objects');
     $this->webFilesystem = $this->container->get('jarves.filesystem.web');
     $this->utils = $this->container->get('jarves.utils');
     $this->acl = $this->container->get('jarves.acl');
 }
Esempio n. 14
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->jarves = $this->get('jarves');
     $this->acl = $this->get('jarves.acl');
     $this->pageStack = $this->get('jarves.page_stack');
     $this->contentRender = $this->get('jarves.content.render');
     $this->logger = $this->get('logger');
     $this->encoderFactory = $this->get('security.encoder_factory');
     $this->tokenStorage = $this->get('security.token_storage');
     $this->userProvider = $this->get('jarves.user_provider');
 }
Esempio n. 15
0
 public function testForward()
 {
     $request = Request::create('/');
     $request->setLocale('fr');
     $request->setRequestFormat('xml');
     $kernel = $this->getMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
     $kernel->expects($this->once())->method('handle')->will($this->returnCallback(function (Request $request) {
         return new Response($request->getRequestFormat() . '--' . $request->getLocale());
     }));
     $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $container->expects($this->at(0))->method('get')->will($this->returnValue($request));
     $container->expects($this->at(1))->method('get')->will($this->returnValue($kernel));
     $controller = new Controller();
     $controller->setContainer($container);
     $response = $controller->forward('a_controller');
     $this->assertEquals('xml--fr', $response->getContent());
 }
 /**
  * Override method to call #containerInitialized method when container set.
  * {@inheritdoc}
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->setManager();
 }
Esempio n. 17
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->depedencies = $this->get('mardraze_core.depedencies');
 }
 /**
  * Sets the Container associated with this Controller.
  *
  * @param ContainerInterface $container A ContainerInterface instance
  */
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $seed = substr(md5($this->get('kernel')->getRootDir()), 0, 8);
     $this->sessionKey = SessionStorage::DEFAULT_KEY . '.' . $seed;
 }
Esempio n. 19
0
 public function setContainer(ContainerInterface $container = NULL)
 {
     parent::setContainer($container);
     $this->_em = $this->getDoctrine()->getManager();
 }
Esempio n. 20
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->jarvesConfig = $this->container->get('jarves.config');
 }
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->initializeProject();
 }
Esempio n. 22
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->jarves = $this->container->get('jarves');
     $this->translator = $this->container->get('jarves.translator');
 }
Esempio n. 23
0
 public function getController(\Symfony\Bundle\FrameworkBundle\Controller\Controller $controller)
 {
     $controller->setContainer($this->container);
     return $controller;
 }
Esempio n. 24
0
 public function testGetDoctrine()
 {
     $doctrine = $this->getMock('Doctrine\\Common\\Persistence\\ManagerRegistry');
     $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
     $container->expects($this->at(0))->method('has')->will($this->returnValue(true));
     $container->expects($this->at(1))->method('get')->will($this->returnValue($doctrine));
     $controller = new Controller();
     $controller->setContainer($container);
     $this->assertEquals($doctrine, $controller->getDoctrine());
 }
Esempio n. 25
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->objects = $this->container->get('jarves.objects');
     $this->cacher = $this->container->get('jarves.cache.cacher');
 }
Esempio n. 26
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->securityContext = $this->container->get('security.context');
 }
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->configure();
 }
 /**
  * Performs all initialization in the setContainer method
  **/
 public function setContainer(ContainerInterface $container = null)
 {
     $ret = parent::setContainer($container);
     $this->init();
     return $ret;
 }
Esempio n. 29
0
 public function setContainer(ContainerInterface $container = NULL)
 {
     parent::setContainer($container);
     $this->_em = $this->getDoctrine()->getManager();
     $this->expectationManager = $this->get("overwatch_expectation.expectation_manager");
 }
Esempio n. 30
0
 public function setContainer(\Symfony\Component\DependencyInjection\ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->IniciarVariables();
 }