示例#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'];
 }
示例#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'];
 }
示例#5
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->translator = $container->get('translator');
     if (method_exists($this, 'init')) {
         $this->init();
     }
 }
示例#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');
 }
示例#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');
 }
示例#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');
 }
示例#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');
     }
 }
示例#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');
 }
示例#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');
 }
示例#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');
 }
示例#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');
 }
示例#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();
 }
示例#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;
 }
示例#19
0
 public function setContainer(ContainerInterface $container = NULL)
 {
     parent::setContainer($container);
     $this->_em = $this->getDoctrine()->getManager();
 }
示例#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();
 }
示例#22
0
 public function setContainer(ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->jarves = $this->container->get('jarves');
     $this->translator = $this->container->get('jarves.translator');
 }
示例#23
0
 public function getController(\Symfony\Bundle\FrameworkBundle\Controller\Controller $controller)
 {
     $controller->setContainer($this->container);
     return $controller;
 }
示例#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());
 }
示例#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');
 }
示例#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;
 }
示例#29
0
 public function setContainer(ContainerInterface $container = NULL)
 {
     parent::setContainer($container);
     $this->_em = $this->getDoctrine()->getManager();
     $this->expectationManager = $this->get("overwatch_expectation.expectation_manager");
 }
示例#30
0
 public function setContainer(\Symfony\Component\DependencyInjection\ContainerInterface $container = null)
 {
     parent::setContainer($container);
     $this->IniciarVariables();
 }