@@ -33,14 +33,14 @@ |
||
| 33 | 33 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 34 | 34 | { |
| 35 | 35 | $builder |
| 36 | - ->add('name', TextType::class) |
|
| 36 | + ->add('name', TextType::class) |
|
| 37 | 37 | ->add( |
| 38 | 38 | 'permissions', |
| 39 | 39 | CollectionType::class, |
| 40 | 40 | [ |
| 41 | - 'entry_type' => TextType::class, |
|
| 42 | - 'allow_add' => true, |
|
| 43 | - ] |
|
| 41 | + 'entry_type' => TextType::class, |
|
| 42 | + 'allow_add' => true, |
|
| 43 | + ] |
|
| 44 | 44 | ); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -25,19 +25,19 @@ |
||
| 25 | 25 | * @var array |
| 26 | 26 | */ |
| 27 | 27 | private static $doctrineDrivers = array( |
| 28 | - 'orm' => array( |
|
| 28 | + 'orm' => array( |
|
| 29 | 29 | 'registry' => 'doctrine', |
| 30 | 30 | 'tag' => 'doctrine.event_subscriber', |
| 31 | - ), |
|
| 32 | - 'mongodb' => array( |
|
| 31 | + ), |
|
| 32 | + 'mongodb' => array( |
|
| 33 | 33 | 'registry' => 'doctrine_mongodb', |
| 34 | 34 | 'tag' => 'doctrine_mongodb.odm.event_subscriber', |
| 35 | - ), |
|
| 36 | - 'couchdb' => array( |
|
| 35 | + ), |
|
| 36 | + 'couchdb' => array( |
|
| 37 | 37 | 'registry' => 'doctrine_couchdb', |
| 38 | 38 | 'tag' => 'doctrine_couchdb.event_subscriber', |
| 39 | 39 | 'listener_class' => 'Eloyekunle\PermissionsBundle\Doctrine\CouchDB\UserListener', |
| 40 | - ), |
|
| 40 | + ), |
|
| 41 | 41 | ); |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -28,19 +28,19 @@ discard block |
||
| 28 | 28 | $supportedDrivers = array('orm', 'mongodb', 'couchdb', 'custom'); |
| 29 | 29 | |
| 30 | 30 | $rootNode |
| 31 | - ->addDefaultsIfNotSet() |
|
| 32 | - ->children() |
|
| 33 | - ->scalarNode('db_driver') |
|
| 34 | - ->validate() |
|
| 35 | - ->ifNotInArray($supportedDrivers) |
|
| 36 | - ->thenInvalid('The driver %s is not supported. Please choose one of '.json_encode($supportedDrivers)) |
|
| 37 | - ->end() |
|
| 38 | - ->cannotBeOverwritten() |
|
| 39 | - ->isRequired() |
|
| 40 | - ->cannotBeEmpty() |
|
| 41 | - ->end() |
|
| 42 | - ->scalarNode('role_class')->isRequired()->cannotBeEmpty()->end() |
|
| 43 | - ->end(); |
|
| 31 | + ->addDefaultsIfNotSet() |
|
| 32 | + ->children() |
|
| 33 | + ->scalarNode('db_driver') |
|
| 34 | + ->validate() |
|
| 35 | + ->ifNotInArray($supportedDrivers) |
|
| 36 | + ->thenInvalid('The driver %s is not supported. Please choose one of '.json_encode($supportedDrivers)) |
|
| 37 | + ->end() |
|
| 38 | + ->cannotBeOverwritten() |
|
| 39 | + ->isRequired() |
|
| 40 | + ->cannotBeEmpty() |
|
| 41 | + ->end() |
|
| 42 | + ->scalarNode('role_class')->isRequired()->cannotBeEmpty()->end() |
|
| 43 | + ->end(); |
|
| 44 | 44 | |
| 45 | 45 | $this->addModuleSection($rootNode); |
| 46 | 46 | |
@@ -50,12 +50,12 @@ discard block |
||
| 50 | 50 | private function addModuleSection(ArrayNodeDefinition $node) |
| 51 | 51 | { |
| 52 | 52 | $node |
| 53 | - ->children() |
|
| 53 | + ->children() |
|
| 54 | 54 | ->arrayNode('module') |
| 55 | 55 | ->addDefaultsIfNotSet() |
| 56 | 56 | ->canBeUnset() |
| 57 | 57 | ->children() |
| 58 | - ->scalarNode('definitions_path')->defaultNull()->isRequired() |
|
| 58 | + ->scalarNode('definitions_path')->defaultNull()->isRequired() |
|
| 59 | 59 | ->end(); |
| 60 | 60 | } |
| 61 | 61 | } |