@@ -20,40 +20,40 @@ |
||
| 20 | 20 | |
| 21 | 21 | class MailServiceFactory implements FactoryInterface |
| 22 | 22 | { |
| 23 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 24 | - { |
|
| 25 | - $config = $container->get('Config'); |
|
| 26 | - $mails = isset($config['mails']) ? $config['mails'] : []; |
|
| 23 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 24 | + { |
|
| 25 | + $config = $container->get('Config'); |
|
| 26 | + $mails = isset($config['mails']) ? $config['mails'] : []; |
|
| 27 | 27 | |
| 28 | - /* @var \Auth\Options\ModuleOptions $authOptions */ |
|
| 29 | - $authOptions = $container->get('Auth/Options'); |
|
| 28 | + /* @var \Auth\Options\ModuleOptions $authOptions */ |
|
| 29 | + $authOptions = $container->get('Auth/Options'); |
|
| 30 | 30 | |
| 31 | - /* @var \Core\Options\MailServiceOptions $mailServiceOptions */ |
|
| 32 | - $mailServiceOptions = $container->get('Core/MailServiceOptions'); |
|
| 31 | + /* @var \Core\Options\MailServiceOptions $mailServiceOptions */ |
|
| 32 | + $mailServiceOptions = $container->get('Core/MailServiceOptions'); |
|
| 33 | 33 | |
| 34 | - $configArray = [ |
|
| 35 | - 'from' => [ |
|
| 36 | - 'name' => $authOptions->getFromName(), |
|
| 37 | - 'email' => $authOptions->getFromEmail() |
|
| 38 | - ], |
|
| 39 | - ]; |
|
| 34 | + $configArray = [ |
|
| 35 | + 'from' => [ |
|
| 36 | + 'name' => $authOptions->getFromName(), |
|
| 37 | + 'email' => $authOptions->getFromEmail() |
|
| 38 | + ], |
|
| 39 | + ]; |
|
| 40 | 40 | |
| 41 | - if ($mailServiceOptions->getTransportClass() == 'smtp') { |
|
| 42 | - $configArray['transport'] = new Smtp($mailServiceOptions); |
|
| 43 | - } |
|
| 41 | + if ($mailServiceOptions->getTransportClass() == 'smtp') { |
|
| 42 | + $configArray['transport'] = new Smtp($mailServiceOptions); |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - $configArray = array_merge($configArray, $mails); |
|
| 45 | + $configArray = array_merge($configArray, $mails); |
|
| 46 | 46 | |
| 47 | - $config = new MailServiceConfig($configArray); |
|
| 48 | - $service = new MailService($container,$config->toArray()); |
|
| 49 | - $config->configureServiceManager($service); |
|
| 50 | - foreach($config->toArray() as $name=>$value){ |
|
| 51 | - $method = 'set'.$name; |
|
| 52 | - if(method_exists($service,$method)){ |
|
| 53 | - call_user_func([$service,$method],$value); |
|
| 54 | - } |
|
| 55 | - } |
|
| 47 | + $config = new MailServiceConfig($configArray); |
|
| 48 | + $service = new MailService($container,$config->toArray()); |
|
| 49 | + $config->configureServiceManager($service); |
|
| 50 | + foreach($config->toArray() as $name=>$value){ |
|
| 51 | + $method = 'set'.$name; |
|
| 52 | + if(method_exists($service,$method)){ |
|
| 53 | + call_user_func([$service,$method],$value); |
|
| 54 | + } |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - return $service; |
|
| 58 | - } |
|
| 57 | + return $service; |
|
| 58 | + } |
|
| 59 | 59 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | class MailServiceFactory implements FactoryInterface |
| 22 | 22 | { |
| 23 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 23 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 24 | 24 | { |
| 25 | 25 | $config = $container->get('Config'); |
| 26 | 26 | $mails = isset($config['mails']) ? $config['mails'] : []; |
@@ -45,12 +45,12 @@ discard block |
||
| 45 | 45 | $configArray = array_merge($configArray, $mails); |
| 46 | 46 | |
| 47 | 47 | $config = new MailServiceConfig($configArray); |
| 48 | - $service = new MailService($container,$config->toArray()); |
|
| 48 | + $service = new MailService($container, $config->toArray()); |
|
| 49 | 49 | $config->configureServiceManager($service); |
| 50 | - foreach($config->toArray() as $name=>$value){ |
|
| 50 | + foreach ($config->toArray() as $name=>$value) { |
|
| 51 | 51 | $method = 'set'.$name; |
| 52 | - if(method_exists($service,$method)){ |
|
| 53 | - call_user_func([$service,$method],$value); |
|
| 52 | + if (method_exists($service, $method)) { |
|
| 53 | + call_user_func([$service, $method], $value); |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
@@ -219,10 +219,10 @@ |
||
| 219 | 219 | ], |
| 220 | 220 | |
| 221 | 221 | 'input_filters' => [ |
| 222 | - 'aliases' => [ |
|
| 223 | - 'Cv/Employment' => Employment::class, |
|
| 224 | - 'Cv/Education' => Education::class |
|
| 225 | - ], |
|
| 222 | + 'aliases' => [ |
|
| 223 | + 'Cv/Employment' => Employment::class, |
|
| 224 | + 'Cv/Education' => Education::class |
|
| 225 | + ], |
|
| 226 | 226 | 'invokables' => [ |
| 227 | 227 | 'Cv/Employment' => Employment::class, |
| 228 | 228 | 'Cv/Education' => Education::class |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * for multiple paths. |
| 24 | 24 | * example https://github.com/doctrine/DoctrineORMModule |
| 25 | 25 | */ |
| 26 | - 'paths' => [ __DIR__ . '/../src/Cv/Entity'], |
|
| 26 | + 'paths' => [__DIR__.'/../src/Cv/Entity'], |
|
| 27 | 27 | ], |
| 28 | 28 | ], |
| 29 | 29 | 'eventmanager' => [ |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | 'translation_file_patterns' => [ |
| 45 | 45 | [ |
| 46 | 46 | 'type' => 'gettext', |
| 47 | - 'base_dir' => __DIR__ . '/../language', |
|
| 47 | + 'base_dir' => __DIR__.'/../language', |
|
| 48 | 48 | 'pattern' => '%s.mo', |
| 49 | 49 | ], |
| 50 | 50 | ], |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | 'factories' => [ |
| 155 | 155 | \Cv\Controller\IndexController::class => \Zend\ServiceManager\Factory\InvokableFactory::class, |
| 156 | 156 | 'Cv/View' => 'Cv\Factory\Controller\ViewControllerFactory', |
| 157 | - 'Cv\Controller\Manage' => [ManageController::class,'factory'], |
|
| 157 | + 'Cv\Controller\Manage' => [ManageController::class, 'factory'], |
|
| 158 | 158 | ], |
| 159 | 159 | 'aliases' => [ |
| 160 | 160 | 'Cv/Index' => \Cv\Controller\IndexController::class, |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | 'resume-recruiter' => [ |
| 170 | 170 | 'label' => /*@translate*/ 'Talent-Pool', |
| 171 | 171 | 'route' => 'lang/cvs', |
| 172 | - 'active_on' => [ 'lang/cvs/edit', 'lang/cvs/view' ], |
|
| 172 | + 'active_on' => ['lang/cvs/edit', 'lang/cvs/view'], |
|
| 173 | 173 | 'resource' => 'navigation/resume-recruiter', |
| 174 | 174 | 'order' => 10, |
| 175 | 175 | 'query' => [ |
@@ -200,15 +200,15 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | // Map template to files. Speeds up the lookup through the template stack. |
| 202 | 202 | 'template_map' => [ |
| 203 | - 'cv/form/employment.view' => __DIR__ . '/../view/cv/form/employment.view.phtml', |
|
| 204 | - 'cv/form/employment.form' => __DIR__ . '/../view/cv/form/employment.form.phtml', |
|
| 205 | - 'cv/form/education.view' => __DIR__ . '/../view/cv/form/education.view.phtml', |
|
| 206 | - 'cv/form/education.form' => __DIR__ . '/../view/cv/form/education.form.phtml' |
|
| 203 | + 'cv/form/employment.view' => __DIR__.'/../view/cv/form/employment.view.phtml', |
|
| 204 | + 'cv/form/employment.form' => __DIR__.'/../view/cv/form/employment.form.phtml', |
|
| 205 | + 'cv/form/education.view' => __DIR__.'/../view/cv/form/education.view.phtml', |
|
| 206 | + 'cv/form/education.form' => __DIR__.'/../view/cv/form/education.form.phtml' |
|
| 207 | 207 | ], |
| 208 | 208 | |
| 209 | 209 | // Where to look for view templates not mapped above |
| 210 | 210 | 'template_path_stack' => [ |
| 211 | - __DIR__ . '/../view', |
|
| 211 | + __DIR__.'/../view', |
|
| 212 | 212 | ], |
| 213 | 213 | ], |
| 214 | 214 | |
@@ -24,12 +24,12 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | class PaginationQueryFactory implements FactoryInterface |
| 26 | 26 | { |
| 27 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 28 | - { |
|
| 29 | - $auth = $container->get('AuthenticationService'); |
|
| 30 | - $user = $auth->hasIdentity() ? $auth->getUser() : null; |
|
| 31 | - $filter = new PaginationQuery($user); |
|
| 27 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 28 | + { |
|
| 29 | + $auth = $container->get('AuthenticationService'); |
|
| 30 | + $user = $auth->hasIdentity() ? $auth->getUser() : null; |
|
| 31 | + $filter = new PaginationQuery($user); |
|
| 32 | 32 | |
| 33 | - return $filter; |
|
| 34 | - } |
|
| 33 | + return $filter; |
|
| 34 | + } |
|
| 35 | 35 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | class PaginationQueryFactory implements FactoryInterface |
| 26 | 26 | { |
| 27 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 27 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 28 | 28 | { |
| 29 | 29 | $auth = $container->get('AuthenticationService'); |
| 30 | 30 | $user = $auth->hasIdentity() ? $auth->getUser() : null; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | use Cv\Controller\ViewController; |
| 14 | 14 | use Interop\Container\ContainerInterface; |
| 15 | -use Zend\ServiceManager\Factory\FactoryInterface;; |
|
| 15 | +use Zend\ServiceManager\Factory\FactoryInterface; ; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * ${CARET} |
@@ -9,20 +9,20 @@ |
||
| 9 | 9 | |
| 10 | 10 | class LanguageSkillCollectionFactory implements FactoryInterface |
| 11 | 11 | { |
| 12 | - /** |
|
| 13 | - * Create a CollectionContainer form |
|
| 14 | - * |
|
| 15 | - * @param ContainerInterface $container |
|
| 16 | - * @param string $requestedName |
|
| 17 | - * @param array|null $options |
|
| 18 | - * |
|
| 19 | - * @return \Core\Form\CollectionContainer |
|
| 20 | - */ |
|
| 12 | + /** |
|
| 13 | + * Create a CollectionContainer form |
|
| 14 | + * |
|
| 15 | + * @param ContainerInterface $container |
|
| 16 | + * @param string $requestedName |
|
| 17 | + * @param array|null $options |
|
| 18 | + * |
|
| 19 | + * @return \Core\Form\CollectionContainer |
|
| 20 | + */ |
|
| 21 | 21 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { |
| 22 | - $collectionContainer = new CollectionContainer( 'Cv/LanguageSkillForm', new Language() ); |
|
| 23 | - $collectionContainer->setLabel(/*@translate */ |
|
| 24 | - 'Additional Language Skills' ); |
|
| 22 | + $collectionContainer = new CollectionContainer( 'Cv/LanguageSkillForm', new Language() ); |
|
| 23 | + $collectionContainer->setLabel(/*@translate */ |
|
| 24 | + 'Additional Language Skills' ); |
|
| 25 | 25 | |
| 26 | - return $collectionContainer; |
|
| 26 | + return $collectionContainer; |
|
| 27 | 27 | } |
| 28 | 28 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | * @return \Core\Form\CollectionContainer |
| 20 | 20 | */ |
| 21 | 21 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { |
| 22 | - $collectionContainer = new CollectionContainer( 'Cv/LanguageSkillForm', new Language() ); |
|
| 22 | + $collectionContainer = new CollectionContainer('Cv/LanguageSkillForm', new Language()); |
|
| 23 | 23 | $collectionContainer->setLabel(/*@translate */ |
| 24 | 24 | 'Additional Language Skills' ); |
| 25 | 25 | |
@@ -25,8 +25,8 @@ discard block |
||
| 25 | 25 | public function init() |
| 26 | 26 | { |
| 27 | 27 | $this->setName('employment') |
| 28 | - ->setHydrator(new EntityHydrator()) |
|
| 29 | - ->setObject(new EmploymentEntity()); |
|
| 28 | + ->setHydrator(new EntityHydrator()) |
|
| 29 | + ->setObject(new EmploymentEntity()); |
|
| 30 | 30 | |
| 31 | 31 | $this->add( |
| 32 | 32 | array( |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | return [ |
| 90 | 90 | //'type' => 'Cv/Employment' |
| 91 | - 'type' => Employment::class |
|
| 91 | + 'type' => Employment::class |
|
| 92 | 92 | ]; |
| 93 | 93 | } |
| 94 | 94 | |
@@ -14,133 +14,133 @@ |
||
| 14 | 14 | |
| 15 | 15 | return [ |
| 16 | 16 | |
| 17 | - 'doctrine' => [ |
|
| 18 | - 'driver' => [ |
|
| 19 | - 'odm_default' => [ |
|
| 20 | - 'drivers' => [ |
|
| 21 | - 'Settings\Entity' => 'annotation', |
|
| 22 | - ], |
|
| 23 | - ], |
|
| 24 | - ], |
|
| 25 | - 'eventmanager' => [ |
|
| 26 | - 'odm_default' => [ |
|
| 27 | - 'subscribers' => [ |
|
| 28 | - 'Settings/InjectEntityResolverListener', |
|
| 29 | - ], |
|
| 30 | - ], |
|
| 31 | - ], |
|
| 32 | - ], |
|
| 17 | + 'doctrine' => [ |
|
| 18 | + 'driver' => [ |
|
| 19 | + 'odm_default' => [ |
|
| 20 | + 'drivers' => [ |
|
| 21 | + 'Settings\Entity' => 'annotation', |
|
| 22 | + ], |
|
| 23 | + ], |
|
| 24 | + ], |
|
| 25 | + 'eventmanager' => [ |
|
| 26 | + 'odm_default' => [ |
|
| 27 | + 'subscribers' => [ |
|
| 28 | + 'Settings/InjectEntityResolverListener', |
|
| 29 | + ], |
|
| 30 | + ], |
|
| 31 | + ], |
|
| 32 | + ], |
|
| 33 | 33 | |
| 34 | 34 | |
| 35 | - // Translations |
|
| 36 | - 'translator' => [ |
|
| 37 | - 'translation_file_patterns' => [ |
|
| 38 | - [ |
|
| 39 | - 'type' => 'gettext', |
|
| 40 | - 'base_dir' => __DIR__ . '/../language', |
|
| 41 | - 'pattern' => '%s.mo', |
|
| 42 | - ], |
|
| 43 | - ], |
|
| 44 | - ], |
|
| 45 | - // Routes |
|
| 46 | - 'router' => [ |
|
| 47 | - 'routes' => [ |
|
| 48 | - 'lang' => [ |
|
| 49 | - 'child_routes' => [ |
|
| 50 | - 'settings' => [ |
|
| 51 | - 'type' => 'Segment', |
|
| 52 | - 'options' => [ |
|
| 53 | - 'route' => '/settings[/:module]', |
|
| 54 | - 'defaults' => [ |
|
| 55 | - 'controller' => 'Settings\Controller\Index', |
|
| 56 | - 'action' => 'index', |
|
| 57 | - 'module' => 'Core', |
|
| 58 | - ], |
|
| 59 | - ], |
|
| 60 | - 'may_terminate' => true, |
|
| 61 | - ], |
|
| 62 | - ], |
|
| 63 | - ], |
|
| 64 | - ], |
|
| 65 | - ], |
|
| 35 | + // Translations |
|
| 36 | + 'translator' => [ |
|
| 37 | + 'translation_file_patterns' => [ |
|
| 38 | + [ |
|
| 39 | + 'type' => 'gettext', |
|
| 40 | + 'base_dir' => __DIR__ . '/../language', |
|
| 41 | + 'pattern' => '%s.mo', |
|
| 42 | + ], |
|
| 43 | + ], |
|
| 44 | + ], |
|
| 45 | + // Routes |
|
| 46 | + 'router' => [ |
|
| 47 | + 'routes' => [ |
|
| 48 | + 'lang' => [ |
|
| 49 | + 'child_routes' => [ |
|
| 50 | + 'settings' => [ |
|
| 51 | + 'type' => 'Segment', |
|
| 52 | + 'options' => [ |
|
| 53 | + 'route' => '/settings[/:module]', |
|
| 54 | + 'defaults' => [ |
|
| 55 | + 'controller' => 'Settings\Controller\Index', |
|
| 56 | + 'action' => 'index', |
|
| 57 | + 'module' => 'Core', |
|
| 58 | + ], |
|
| 59 | + ], |
|
| 60 | + 'may_terminate' => true, |
|
| 61 | + ], |
|
| 62 | + ], |
|
| 63 | + ], |
|
| 64 | + ], |
|
| 65 | + ], |
|
| 66 | 66 | |
| 67 | - 'acl' => ['rules' => [ |
|
| 68 | - 'user' => [ |
|
| 69 | - 'allow' => [ |
|
| 70 | - 'route/lang/settings', |
|
| 71 | - 'Settings\Controller\Index', |
|
| 72 | - ], |
|
| 73 | - ], |
|
| 74 | - ]], |
|
| 75 | - 'navigation' => [ |
|
| 76 | - 'default' => [ |
|
| 77 | - 'settings' => [ |
|
| 78 | - 'label' => /*@translate*/ 'Settings', |
|
| 79 | - 'route' => 'lang/settings', |
|
| 80 | - 'resource' => 'route/lang/settings', |
|
| 81 | - 'order' => 100, |
|
| 82 | - 'params' => ['module' => null], |
|
| 83 | - ], |
|
| 84 | - ], |
|
| 85 | - ], |
|
| 67 | + 'acl' => ['rules' => [ |
|
| 68 | + 'user' => [ |
|
| 69 | + 'allow' => [ |
|
| 70 | + 'route/lang/settings', |
|
| 71 | + 'Settings\Controller\Index', |
|
| 72 | + ], |
|
| 73 | + ], |
|
| 74 | + ]], |
|
| 75 | + 'navigation' => [ |
|
| 76 | + 'default' => [ |
|
| 77 | + 'settings' => [ |
|
| 78 | + 'label' => /*@translate*/ 'Settings', |
|
| 79 | + 'route' => 'lang/settings', |
|
| 80 | + 'resource' => 'route/lang/settings', |
|
| 81 | + 'order' => 100, |
|
| 82 | + 'params' => ['module' => null], |
|
| 83 | + ], |
|
| 84 | + ], |
|
| 85 | + ], |
|
| 86 | 86 | |
| 87 | - // Configuration of the controller service manager (Which loads controllers) |
|
| 88 | - 'controllers' => [ |
|
| 89 | - 'factories' => [ |
|
| 90 | - 'Settings\Controller\Index' => [\Settings\Controller\IndexController::class,'factory'] |
|
| 91 | - ], |
|
| 92 | - ], |
|
| 87 | + // Configuration of the controller service manager (Which loads controllers) |
|
| 88 | + 'controllers' => [ |
|
| 89 | + 'factories' => [ |
|
| 90 | + 'Settings\Controller\Index' => [\Settings\Controller\IndexController::class,'factory'] |
|
| 91 | + ], |
|
| 92 | + ], |
|
| 93 | 93 | |
| 94 | - // Configure the view service manager |
|
| 95 | - 'view_manager' => [ |
|
| 96 | - // Map template to files. Speeds up the lookup through the template stack. |
|
| 97 | - 'template_map' => [ |
|
| 98 | - ], |
|
| 94 | + // Configure the view service manager |
|
| 95 | + 'view_manager' => [ |
|
| 96 | + // Map template to files. Speeds up the lookup through the template stack. |
|
| 97 | + 'template_map' => [ |
|
| 98 | + ], |
|
| 99 | 99 | |
| 100 | - // Where to look for view templates not mapped above |
|
| 101 | - 'template_path_stack' => [ |
|
| 102 | - __DIR__ . '/../view', |
|
| 103 | - ], |
|
| 104 | - ], |
|
| 100 | + // Where to look for view templates not mapped above |
|
| 101 | + 'template_path_stack' => [ |
|
| 102 | + __DIR__ . '/../view', |
|
| 103 | + ], |
|
| 104 | + ], |
|
| 105 | 105 | |
| 106 | - 'view_helpers' => [ |
|
| 107 | - 'invokables' => [ |
|
| 108 | - 'Settings/FormDisableElementsCapableFormSettings' => 'Settings\Form\View\Helper\FormDisableElementsCapableFormSettings', |
|
| 109 | - ], |
|
| 110 | - 'factories' => [ |
|
| 111 | - ], |
|
| 112 | - ], |
|
| 106 | + 'view_helpers' => [ |
|
| 107 | + 'invokables' => [ |
|
| 108 | + 'Settings/FormDisableElementsCapableFormSettings' => 'Settings\Form\View\Helper\FormDisableElementsCapableFormSettings', |
|
| 109 | + ], |
|
| 110 | + 'factories' => [ |
|
| 111 | + ], |
|
| 112 | + ], |
|
| 113 | 113 | |
| 114 | - 'service_manager' => [ |
|
| 115 | - 'factories' => [ |
|
| 116 | - 'Settings' => '\Settings\Settings\SettingsFactory', |
|
| 117 | - 'Settings/EntityResolver' => '\Settings\Repository\SettingsEntityResolverFactory', |
|
| 118 | - 'Settings/InjectEntityResolverListener' => [\Settings\Repository\Event\InjectSettingsEntityResolverListener::class,'factory'], |
|
| 119 | - ], |
|
| 120 | - 'initializers' => [], |
|
| 121 | - 'shared' => [], |
|
| 122 | - 'aliases' => [], |
|
| 123 | - ], |
|
| 114 | + 'service_manager' => [ |
|
| 115 | + 'factories' => [ |
|
| 116 | + 'Settings' => '\Settings\Settings\SettingsFactory', |
|
| 117 | + 'Settings/EntityResolver' => '\Settings\Repository\SettingsEntityResolverFactory', |
|
| 118 | + 'Settings/InjectEntityResolverListener' => [\Settings\Repository\Event\InjectSettingsEntityResolverListener::class,'factory'], |
|
| 119 | + ], |
|
| 120 | + 'initializers' => [], |
|
| 121 | + 'shared' => [], |
|
| 122 | + 'aliases' => [], |
|
| 123 | + ], |
|
| 124 | 124 | |
| 125 | - 'controller_plugins' => [ |
|
| 126 | - 'factories' => ['settings' => '\Settings\Controller\Plugin\SettingsFactory'], |
|
| 127 | - ], |
|
| 125 | + 'controller_plugins' => [ |
|
| 126 | + 'factories' => ['settings' => '\Settings\Controller\Plugin\SettingsFactory'], |
|
| 127 | + ], |
|
| 128 | 128 | |
| 129 | - 'form_elements' => [ |
|
| 130 | - 'factories' => [ |
|
| 131 | - 'Settings/Form' => [\Settings\Form\AbstractSettingsForm::class,'factory'], |
|
| 132 | - 'Settings/DisableElementsCapableFormSettingsFieldset' => [\Settings\Form\DisableElementsCapableFormSettingsFieldset::class,'factory'], |
|
| 133 | - 'Settings/Fieldset' => \Settings\Form\Factory\SettingsFieldsetFactory::class, |
|
| 134 | - ], |
|
| 135 | - 'aliases' => [ |
|
| 136 | - ], |
|
| 137 | - ], |
|
| 129 | + 'form_elements' => [ |
|
| 130 | + 'factories' => [ |
|
| 131 | + 'Settings/Form' => [\Settings\Form\AbstractSettingsForm::class,'factory'], |
|
| 132 | + 'Settings/DisableElementsCapableFormSettingsFieldset' => [\Settings\Form\DisableElementsCapableFormSettingsFieldset::class,'factory'], |
|
| 133 | + 'Settings/Fieldset' => \Settings\Form\Factory\SettingsFieldsetFactory::class, |
|
| 134 | + ], |
|
| 135 | + 'aliases' => [ |
|
| 136 | + ], |
|
| 137 | + ], |
|
| 138 | 138 | |
| 139 | - 'filters' => [ |
|
| 140 | - 'invokables' => [ |
|
| 141 | - 'Settings/Filter/DisableElementsCapableFormSettings' => \Settings\Form\Filter\DisableElementsCapableFormSettings::class, |
|
| 142 | - ] |
|
| 143 | - ] |
|
| 139 | + 'filters' => [ |
|
| 140 | + 'invokables' => [ |
|
| 141 | + 'Settings/Filter/DisableElementsCapableFormSettings' => \Settings\Form\Filter\DisableElementsCapableFormSettings::class, |
|
| 142 | + ] |
|
| 143 | + ] |
|
| 144 | 144 | |
| 145 | 145 | |
| 146 | 146 | ]; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | 'translation_file_patterns' => [ |
| 38 | 38 | [ |
| 39 | 39 | 'type' => 'gettext', |
| 40 | - 'base_dir' => __DIR__ . '/../language', |
|
| 40 | + 'base_dir' => __DIR__.'/../language', |
|
| 41 | 41 | 'pattern' => '%s.mo', |
| 42 | 42 | ], |
| 43 | 43 | ], |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | // Configuration of the controller service manager (Which loads controllers) |
| 88 | 88 | 'controllers' => [ |
| 89 | 89 | 'factories' => [ |
| 90 | - 'Settings\Controller\Index' => [\Settings\Controller\IndexController::class,'factory'] |
|
| 90 | + 'Settings\Controller\Index' => [\Settings\Controller\IndexController::class, 'factory'] |
|
| 91 | 91 | ], |
| 92 | 92 | ], |
| 93 | 93 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | // Where to look for view templates not mapped above |
| 101 | 101 | 'template_path_stack' => [ |
| 102 | - __DIR__ . '/../view', |
|
| 102 | + __DIR__.'/../view', |
|
| 103 | 103 | ], |
| 104 | 104 | ], |
| 105 | 105 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | 'factories' => [ |
| 116 | 116 | 'Settings' => '\Settings\Settings\SettingsFactory', |
| 117 | 117 | 'Settings/EntityResolver' => '\Settings\Repository\SettingsEntityResolverFactory', |
| 118 | - 'Settings/InjectEntityResolverListener' => [\Settings\Repository\Event\InjectSettingsEntityResolverListener::class,'factory'], |
|
| 118 | + 'Settings/InjectEntityResolverListener' => [\Settings\Repository\Event\InjectSettingsEntityResolverListener::class, 'factory'], |
|
| 119 | 119 | ], |
| 120 | 120 | 'initializers' => [], |
| 121 | 121 | 'shared' => [], |
@@ -128,8 +128,8 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | 'form_elements' => [ |
| 130 | 130 | 'factories' => [ |
| 131 | - 'Settings/Form' => [\Settings\Form\AbstractSettingsForm::class,'factory'], |
|
| 132 | - 'Settings/DisableElementsCapableFormSettingsFieldset' => [\Settings\Form\DisableElementsCapableFormSettingsFieldset::class,'factory'], |
|
| 131 | + 'Settings/Form' => [\Settings\Form\AbstractSettingsForm::class, 'factory'], |
|
| 132 | + 'Settings/DisableElementsCapableFormSettingsFieldset' => [\Settings\Form\DisableElementsCapableFormSettingsFieldset::class, 'factory'], |
|
| 133 | 133 | 'Settings/Fieldset' => \Settings\Form\Factory\SettingsFieldsetFactory::class, |
| 134 | 134 | ], |
| 135 | 135 | 'aliases' => [ |
@@ -19,23 +19,23 @@ |
||
| 19 | 19 | |
| 20 | 20 | class SettingsEntityResolverFactory implements FactoryInterface |
| 21 | 21 | { |
| 22 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 23 | - { |
|
| 24 | - $moduleManager = $container->get('ModuleManager'); |
|
| 25 | - $config = $container->get('Config'); |
|
| 22 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 23 | + { |
|
| 24 | + $moduleManager = $container->get('ModuleManager'); |
|
| 25 | + $config = $container->get('Config'); |
|
| 26 | 26 | |
| 27 | - $map = array(); |
|
| 28 | - foreach (array_keys($moduleManager->getLoadedModules()) as $module) { |
|
| 29 | - $map[$module] = isset($config[$module]['settings']['entity']) |
|
| 30 | - ? $config[$module]['settings']['entity'] |
|
| 31 | - : '\Settings\Entity\ModuleSettingsContainer'; |
|
| 32 | - } |
|
| 27 | + $map = array(); |
|
| 28 | + foreach (array_keys($moduleManager->getLoadedModules()) as $module) { |
|
| 29 | + $map[$module] = isset($config[$module]['settings']['entity']) |
|
| 30 | + ? $config[$module]['settings']['entity'] |
|
| 31 | + : '\Settings\Entity\ModuleSettingsContainer'; |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - $resolver = new SettingsEntityResolver($map); |
|
| 35 | - return $resolver; |
|
| 36 | - } |
|
| 34 | + $resolver = new SettingsEntityResolver($map); |
|
| 35 | + return $resolver; |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - public function createService(ServiceLocatorInterface $serviceLocator) |
|
| 38 | + public function createService(ServiceLocatorInterface $serviceLocator) |
|
| 39 | 39 | { |
| 40 | 40 | |
| 41 | 41 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | class SettingsEntityResolverFactory implements FactoryInterface |
| 21 | 21 | { |
| 22 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 22 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 23 | 23 | { |
| 24 | 24 | $moduleManager = $container->get('ModuleManager'); |
| 25 | 25 | $config = $container->get('Config'); |
@@ -11,17 +11,17 @@ |
||
| 11 | 11 | |
| 12 | 12 | class SettingsFactory implements FactoryInterface |
| 13 | 13 | { |
| 14 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 15 | - { |
|
| 16 | - $settings = new Settings(); |
|
| 17 | - $settings->setServiceLocator($container); |
|
| 18 | - $settings->setUserRepository($container->get('RepositoryManager')->get('User')); |
|
| 19 | - $config = $container->get('Config'); |
|
| 14 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 15 | + { |
|
| 16 | + $settings = new Settings(); |
|
| 17 | + $settings->setServiceLocator($container); |
|
| 18 | + $settings->setUserRepository($container->get('RepositoryManager')->get('User')); |
|
| 19 | + $config = $container->get('Config'); |
|
| 20 | 20 | |
| 21 | - // put on the Listener for saving the entity |
|
| 22 | - $application = $container->get('Application'); |
|
| 23 | - $events = $application->getEventManager(); |
|
| 24 | - $events->attach('postDispatch', array($settings, 'onPostDispatch')); |
|
| 25 | - return $settings; |
|
| 26 | - } |
|
| 21 | + // put on the Listener for saving the entity |
|
| 22 | + $application = $container->get('Application'); |
|
| 23 | + $events = $application->getEventManager(); |
|
| 24 | + $events->attach('postDispatch', array($settings, 'onPostDispatch')); |
|
| 25 | + return $settings; |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | class SettingsFactory implements FactoryInterface |
| 13 | 13 | { |
| 14 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
| 14 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 15 | 15 | { |
| 16 | 16 | $settings = new Settings(); |
| 17 | 17 | $settings->setServiceLocator($container); |