Overview

Namespaces

  • Mapbender
    • Component
      • HTTP
    • CoreBundle
      • Command
      • Component
        • Exception
      • Controller
      • DataFixtures
        • ORM
      • DependencyInjection
      • Element
        • Type
      • Entity
      • EventListener
      • Extension
      • Form
        • DataTransformer
        • EventListener
        • Type
      • Security
      • Template
    • DrupalIntegrationBundle
      • DependencyInjection
      • Security
        • Authentication
          • Provider
          • Token
        • Authorization
          • Voter
        • Factory
        • Firewall
        • User
      • Session
    • KmlBundle
      • Element
    • ManagerBundle
      • Controller
      • Form
        • DataTransformer
        • Type
    • MonitoringBundle
      • Command
      • Component
      • Controller
      • DependencyInjection
      • Entity
      • EventListener
      • Form
    • PrintBundle
      • Component
      • Controller
    • WmcBundle
      • Component
        • Exception
      • Element
        • Type
      • Entity
      • Form
        • EventListener
        • Type
    • WmsBundle
      • Component
        • Exception
      • Controller
      • DependencyInjection
      • Element
        • Type
      • Entity
      • Event
      • Form
        • EventListener
        • Type
    • WmtsBundle
      • Component
        • Exception
      • Controller
      • Entity
      • Form
        • Type
  • None
  • PHP

Classes

  • DrupalFactory
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
 1: <?php
 2: 
 3: namespace Mapbender\DrupalIntegrationBundle\Security\Factory;
 4: 
 5: use Symfony\Component\DependencyInjection\ContainerBuilder;
 6: use Symfony\Component\DependencyInjection\Reference;
 7: use Symfony\Component\DependencyInjection\DefinitionDecorator;
 8: use Symfony\Component\Config\Definition\Builder\NodeDefinition;
 9: use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface;
10: 
11: 
12: class DrupalFactory implements SecurityFactoryInterface
13: {
14:     public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint)
15:     {
16:         $providerId = 'security.authentication.provider.drupal.'.$id;
17:         $container
18:             ->setDefinition($providerId, new DefinitionDecorator('drupal.security.authentication.provider'))
19:             ->replaceArgument(0, new Reference($userProvider));
20: 
21:         $listenerId = 'security.authentication.listener.drupal.'.$id;
22:         $listener = $container->setDefinition($listenerId, new DefinitionDecorator('drupal.security.authentication.listener'));
23: 
24:         return array($providerId, $listenerId, $defaultEntryPoint);
25:     }
26: 
27:     public function getPosition()
28:     {
29:         return 'pre_auth';
30:     }
31: 
32:     public function getKey()
33:     {
34:         return 'drupal';
35:     }
36: 
37:     public function addConfiguration(NodeDefinition $node)
38:     {
39:     }
40: }
41: 
Mapbender3 API documenation API documentation generated by ApiGen 2.8.0