@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
41 | - * @return mixed |
|
41 | + * @return \Auth\Entity\UserInterface |
|
42 | 42 | */ |
43 | 43 | public function getUser() |
44 | 44 | { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * @param mixed $repositories |
|
71 | + * @param mixed $repository |
|
72 | 72 | * |
73 | 73 | * @return self |
74 | 74 | */ |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | public function getFileEntity() |
94 | 94 | { |
95 | - if (! $this->fileEntity instanceof FileInterface) { |
|
95 | + if (!$this->fileEntity instanceof FileInterface) { |
|
96 | 96 | throw new \RuntimeException('No file entity set or it does not implement \Core\Entity\FileInterface.'); |
97 | 97 | } |
98 | 98 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | public function filter($value) |
103 | 103 | { |
104 | - if (! is_array($value) || ! isset($value['tmp_name']) || ((isset($value['error']) && UPLOAD_ERR_NO_FILE == $value['error']))) { |
|
104 | + if (!is_array($value) || !isset($value['tmp_name']) || ((isset($value['error']) && UPLOAD_ERR_NO_FILE == $value['error']))) { |
|
105 | 105 | return null; |
106 | 106 | } |
107 | 107 |
@@ -169,6 +169,9 @@ |
||
169 | 169 | return new ViewModel($result); |
170 | 170 | } |
171 | 171 | |
172 | + /** |
|
173 | + * @param Organization $organization |
|
174 | + */ |
|
172 | 175 | private function disabledProfileViewModel($organization) |
173 | 176 | { |
174 | 177 | $model = new ViewModel([ |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | { |
83 | 83 | |
84 | 84 | $result = $this->pagination([ |
85 | - 'params' => ['Organizations_Profile',[ |
|
85 | + 'params' => ['Organizations_Profile', [ |
|
86 | 86 | 'q', |
87 | 87 | 'count' => $this->options['count'], |
88 | 88 | 'page' => 1, |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $repo = $this->repo; |
117 | 117 | $id = $this->params('id'); |
118 | 118 | |
119 | - if(is_null($id)){ |
|
119 | + if (is_null($id)) { |
|
120 | 120 | $this->getResponse()->setStatusCode(Response::STATUS_CODE_404); |
121 | 121 | return [ |
122 | 122 | 'message' => $translator->translate('Can not access profile page without id'), |
@@ -125,20 +125,20 @@ discard block |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | $organization = $repo->find($id); |
128 | - if(!$organization instanceof Organization){ |
|
128 | + if (!$organization instanceof Organization) { |
|
129 | 129 | throw new NotFoundException($id); |
130 | 130 | } |
131 | 131 | |
132 | - if( |
|
132 | + if ( |
|
133 | 133 | Organization::PROFILE_DISABLED == $organization->getProfileSetting() |
134 | 134 | || is_null($organization->getProfileSetting()) |
135 | - ){ |
|
135 | + ) { |
|
136 | 136 | return $this->disabledProfileViewModel($organization); |
137 | 137 | } |
138 | 138 | |
139 | 139 | $result = $this->pagination([ |
140 | 140 | 'params' => [ |
141 | - 'Organization_Jobs',[ |
|
141 | + 'Organization_Jobs', [ |
|
142 | 142 | 'q', |
143 | 143 | 'organization_id' => $id, |
144 | 144 | 'count' => $this->options['count'], |
@@ -151,13 +151,13 @@ discard block |
||
151 | 151 | ], |
152 | 152 | ]); |
153 | 153 | |
154 | - if( |
|
154 | + if ( |
|
155 | 155 | Organization::PROFILE_ACTIVE_JOBS == $organization->getProfileSetting() |
156 | - ){ |
|
156 | + ) { |
|
157 | 157 | /* @var \Zend\Paginator\Paginator $paginator */ |
158 | 158 | $paginator = $result['jobs']; |
159 | 159 | $count = $paginator->getTotalItemCount(); |
160 | - if(0===$count){ |
|
160 | + if (0 === $count) { |
|
161 | 161 | return $this->disabledProfileViewModel($organization); |
162 | 162 | } |
163 | 163 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | 'controllers' => [ |
51 | 51 | 'factories' => [ |
52 | - 'Organizations/InviteEmployee' => \Organizations\Factory\Controller\InviteEmployeeControllerFactory::class, |
|
52 | + 'Organizations/InviteEmployee' => \Organizations\Factory\Controller\InviteEmployeeControllerFactory::class, |
|
53 | 53 | 'Organizations/Index' => 'Organizations\Factory\Controller\IndexControllerFactory', |
54 | 54 | 'Organizations/Profile' => 'Organizations\Factory\Controller\ProfileControllerFactory' |
55 | 55 | ] |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | 'view_manager' => [ |
67 | 67 | // Map template to files. Speeds up the lookup through the template stack. |
68 | 68 | 'template_map' => [ |
69 | - 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
70 | - 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
71 | - 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
72 | - 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
73 | - 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
74 | - 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
75 | - 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
76 | - 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
|
69 | + 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
70 | + 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
71 | + 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
72 | + 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
73 | + 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
74 | + 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
75 | + 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
76 | + 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
|
77 | 77 | 'organizations/profile/disabled' => __DIR__ . '/../view/organizations/profile/disabled.phtml', |
78 | 78 | ], |
79 | 79 | // Where to look for view templates not mapped above |
@@ -83,24 +83,24 @@ discard block |
||
83 | 83 | ], |
84 | 84 | 'form_elements' => [ |
85 | 85 | 'invokables' => [ |
86 | - 'Organizations/Form' => 'Organizations\Form\Organizations', |
|
87 | - 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
88 | - 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
89 | - 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
90 | - 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
91 | - 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
92 | - //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
93 | - 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
94 | - 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
95 | - 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
96 | - 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
97 | - 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
98 | - 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
99 | - 'Organizations/Profile' => \Organizations\Form\OrganizationsProfileForm::class, |
|
100 | - 'Organizations/ProfileFieldset' => \Organizations\Form\OrganizationsProfileFieldset::class |
|
86 | + 'Organizations/Form' => 'Organizations\Form\Organizations', |
|
87 | + 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
88 | + 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
89 | + 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
90 | + 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
91 | + 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
92 | + //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
93 | + 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
94 | + 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
95 | + 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
96 | + 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
97 | + 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
98 | + 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
99 | + 'Organizations/Profile' => \Organizations\Form\OrganizationsProfileForm::class, |
|
100 | + 'Organizations/ProfileFieldset' => \Organizations\Form\OrganizationsProfileFieldset::class |
|
101 | 101 | ], |
102 | 102 | 'factories' => [ |
103 | - 'Organizations/OrganizationsNameFieldset' => \Organizations\Factory\Form\OrganizationsNameFieldsetFactory::class, |
|
103 | + 'Organizations/OrganizationsNameFieldset' => \Organizations\Factory\Form\OrganizationsNameFieldsetFactory::class, |
|
104 | 104 | 'Organizations/Image' => \Organizations\Form\LogoImageFactory::class, |
105 | 105 | 'Organizations/EmployeesFieldset' => 'Organizations\Factory\Form\EmployeesFieldsetFactory', |
106 | 106 | 'Organizations/EmployeeFieldset' => 'Organizations\Factory\Form\EmployeeFieldsetFactory', |
@@ -212,13 +212,13 @@ discard block |
||
212 | 212 | |
213 | 213 | 'service_manager' => [ |
214 | 214 | 'invokables' => [ |
215 | - 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
215 | + 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
216 | 216 | ], |
217 | 217 | 'factories' => [ |
218 | - 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
219 | - 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
220 | - 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
221 | - 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory', |
|
218 | + 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
219 | + 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
220 | + 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
221 | + 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory', |
|
222 | 222 | ], |
223 | 223 | ], |
224 | 224 |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | ], |
14 | 14 | ], |
15 | 15 | 'annotation' => [ |
16 | - 'paths' => [ __DIR__ . '/../src/Organizations/Entity'] |
|
16 | + 'paths' => [__DIR__.'/../src/Organizations/Entity'] |
|
17 | 17 | ], |
18 | 18 | ], |
19 | 19 | 'eventmanager' => [ |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | 'translation_file_patterns' => [ |
41 | 41 | [ |
42 | 42 | 'type' => 'gettext', |
43 | - 'base_dir' => __DIR__ . '/../language', |
|
43 | + 'base_dir' => __DIR__.'/../language', |
|
44 | 44 | 'pattern' => '%s.mo', |
45 | 45 | ], |
46 | 46 | ], |
@@ -66,19 +66,19 @@ discard block |
||
66 | 66 | 'view_manager' => [ |
67 | 67 | // Map template to files. Speeds up the lookup through the template stack. |
68 | 68 | 'template_map' => [ |
69 | - 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
70 | - 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
71 | - 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
72 | - 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
73 | - 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
74 | - 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
75 | - 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
76 | - 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
|
77 | - 'organizations/profile/disabled' => __DIR__ . '/../view/organizations/profile/disabled.phtml', |
|
69 | + 'organizations/index/edit' => __DIR__.'/../view/organizations/index/form.phtml', |
|
70 | + 'organizations/form/employees-fieldset' => __DIR__.'/../view/form/employees-fieldset.phtml', |
|
71 | + 'organizations/form/employee-fieldset' => __DIR__.'/../view/form/employee-fieldset.phtml', |
|
72 | + 'organizations/form/invite-employee-bar' => __DIR__.'/../view/form/invite-employee-bar.phtml', |
|
73 | + 'organizations/error/no-parent' => __DIR__.'/../view/error/no-parent.phtml', |
|
74 | + 'organizations/error/invite' => __DIR__.'/../view/error/invite.phtml', |
|
75 | + 'organizations/mail/invite-employee' => __DIR__.'/../view/mail/invite-employee.phtml', |
|
76 | + 'organizations/form/workflow-fieldset' => __DIR__.'/../view/form/workflow-fieldset.phtml', |
|
77 | + 'organizations/profile/disabled' => __DIR__.'/../view/organizations/profile/disabled.phtml', |
|
78 | 78 | ], |
79 | 79 | // Where to look for view templates not mapped above |
80 | 80 | 'template_path_stack' => [ |
81 | - __DIR__ . '/../view', |
|
81 | + __DIR__.'/../view', |
|
82 | 82 | ], |
83 | 83 | ], |
84 | 84 | 'form_elements' => [ |
@@ -156,13 +156,13 @@ discard block |
||
156 | 156 | 'allow' => [ |
157 | 157 | 'Entity/OrganizationImage', |
158 | 158 | 'route/lang/organizations/invite', |
159 | - 'Organizations/InviteEmployee' => [ 'accept' ], |
|
159 | + 'Organizations/InviteEmployee' => ['accept'], |
|
160 | 160 | 'route/lang/organizations/profile', |
161 | 161 | 'route/lang/organizations/profileDetail', |
162 | 162 | ], |
163 | 163 | 'deny' => [ |
164 | 164 | 'route/lang/organizations', |
165 | - 'Organizations/InviteEmployee' => [ 'invite' ], |
|
165 | + 'Organizations/InviteEmployee' => ['invite'], |
|
166 | 166 | ], |
167 | 167 | ], |
168 | 168 | // recruiters are allowed to view their companies |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | 'allow' => [ |
171 | 171 | 'route/lang/organizations', |
172 | 172 | 'Organizations/InviteEmployee', |
173 | - 'Entity/Organization' => [ 'edit' => 'Organizations/Write' ], |
|
173 | + 'Entity/Organization' => ['edit' => 'Organizations/Write'], |
|
174 | 174 | 'route/lang/organizations/profile', |
175 | 175 | 'route/lang/organizations/profileDetail' |
176 | 176 | ], |
@@ -188,8 +188,8 @@ discard block |
||
188 | 188 | 'organizations' => [ |
189 | 189 | 'label' => 'Organizations', |
190 | 190 | 'route' => 'lang/organizations', |
191 | - 'order' => 65, // allows to order the menu items |
|
192 | - 'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied. |
|
191 | + 'order' => 65, // allows to order the menu items |
|
192 | + 'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied. |
|
193 | 193 | |
194 | 194 | 'pages' => [ |
195 | 195 | 'list' => [ |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | use Zend\I18n\Translator\Resources; |
20 | 20 | use Zend\ServiceManager\Factory\InvokableFactory; |
21 | 21 | |
22 | -$doctrineConfig = include __DIR__ . '/doctrine.config.php'; |
|
22 | +$doctrineConfig = include __DIR__.'/doctrine.config.php'; |
|
23 | 23 | |
24 | 24 | |
25 | 25 | return array( |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | 'doctrine' => $doctrineConfig, |
28 | 28 | |
29 | 29 | 'options' => [ |
30 | - 'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ], |
|
30 | + 'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'], |
|
31 | 31 | ], |
32 | 32 | |
33 | 33 | 'Core' => array( |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | 'name' => 'stream', |
48 | 48 | 'priority' => 1000, |
49 | 49 | 'options' => array( |
50 | - 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
50 | + 'stream' => __DIR__.'/../../../log/yawik.log', |
|
51 | 51 | ), |
52 | 52 | ), |
53 | 53 | ), |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | 'name' => 'stream', |
59 | 59 | 'priority' => 1000, |
60 | 60 | 'options' => array( |
61 | - 'stream' => __DIR__ .'/../../../log/mails.log', |
|
61 | + 'stream' => __DIR__.'/../../../log/mails.log', |
|
62 | 62 | ), |
63 | 63 | ), |
64 | 64 | ), |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 'mode' => true, // true = production|false = development|null = autodetect|IP address(es) csv/array |
76 | 76 | 'bar' => false, // bool = enabled|Toggle nette diagnostics bar. |
77 | 77 | 'strict' => true, // bool = cause immediate death|int = matched against error severity |
78 | - 'log' => __DIR__ . '/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files) |
|
78 | + 'log' => __DIR__.'/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files) |
|
79 | 79 | 'email' => null, // in production mode notifies the recipient |
80 | 80 | 'email_snooze' => 900 // interval for sending email in seconds |
81 | 81 | ], |
@@ -220,16 +220,16 @@ discard block |
||
220 | 220 | 'Core/JsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory', |
221 | 221 | 'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory', |
222 | 222 | 'Core/Options' => 'Core\Factory\ModuleOptionsFactory', |
223 | - 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'], |
|
224 | - 'DefaultListeners' => ['Core\Listener\DefaultListener','factory'], |
|
225 | - 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'], |
|
226 | - 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'], |
|
223 | + 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'], |
|
224 | + 'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'], |
|
225 | + 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'], |
|
226 | + 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'], |
|
227 | 227 | 'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory', |
228 | 228 | 'Core/Locale' => 'Core\I18n\LocaleFactory', |
229 | 229 | \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class, |
230 | 230 | \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class, |
231 | 231 | 'Imagine' => \Core\Factory\Service\ImagineFactory::class, |
232 | - 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'], |
|
232 | + 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'], |
|
233 | 233 | ), |
234 | 234 | 'abstract_factories' => array( |
235 | 235 | 'Core\Factory\OptionsAbstractFactory', |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | 'translation_file_patterns' => array( |
253 | 253 | [ |
254 | 254 | 'type' => 'gettext', |
255 | - 'base_dir' => __DIR__ . '/../language', |
|
255 | + 'base_dir' => __DIR__.'/../language', |
|
256 | 256 | 'pattern' => '%s.mo', |
257 | 257 | ], |
258 | 258 | [ |
@@ -307,9 +307,9 @@ discard block |
||
307 | 307 | 'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory', |
308 | 308 | 'listquery' => 'Core\Controller\Plugin\ListQuery::factory', |
309 | 309 | 'mail' => 'Core\Controller\Plugin\Mail::factory', |
310 | - 'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'], |
|
311 | - 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'], |
|
312 | - 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'], |
|
310 | + 'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'], |
|
311 | + 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'], |
|
312 | + 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'], |
|
313 | 313 | ), |
314 | 314 | 'invokables' => array( |
315 | 315 | 'Core/FileSender' => 'Core\Controller\Plugin\FileSender', |
@@ -339,32 +339,32 @@ discard block |
||
339 | 339 | 'exception_template' => 'error/index', |
340 | 340 | // Map template to files. Speeds up the lookup through the template stack. |
341 | 341 | 'template_map' => array( |
342 | - 'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml', |
|
343 | - 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', |
|
344 | - 'error/404' => __DIR__ . '/../view/error/404.phtml', |
|
345 | - 'error/403' => __DIR__ . '/../view/error/403.phtml', |
|
346 | - 'error/index' => __DIR__ . '/../view/error/index.phtml', |
|
347 | - 'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml', |
|
348 | - 'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml', |
|
349 | - 'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml', |
|
350 | - 'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml', |
|
351 | - 'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml', |
|
352 | - 'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml', |
|
353 | - 'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml', |
|
354 | - 'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml', |
|
355 | - 'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml', |
|
356 | - 'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml', |
|
357 | - 'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml', |
|
358 | - 'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml', |
|
359 | - 'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml', |
|
360 | - 'mail/header' => __DIR__ . '/../view/mail/header.phtml', |
|
361 | - 'mail/footer' => __DIR__ . '/../view/mail/footer.phtml', |
|
362 | - 'mail/footer.en' => __DIR__ . '/../view/mail/footer.en.phtml', |
|
342 | + 'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml', |
|
343 | + 'layout/layout' => __DIR__.'/../view/layout/layout.phtml', |
|
344 | + 'error/404' => __DIR__.'/../view/error/404.phtml', |
|
345 | + 'error/403' => __DIR__.'/../view/error/403.phtml', |
|
346 | + 'error/index' => __DIR__.'/../view/error/index.phtml', |
|
347 | + 'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml', |
|
348 | + 'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml', |
|
349 | + 'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml', |
|
350 | + 'core/notifications' => __DIR__.'/../view/partial/notifications.phtml', |
|
351 | + 'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml', |
|
352 | + 'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml', |
|
353 | + 'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml', |
|
354 | + 'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml', |
|
355 | + 'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml', |
|
356 | + 'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml', |
|
357 | + 'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml', |
|
358 | + 'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml', |
|
359 | + 'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml', |
|
360 | + 'mail/header' => __DIR__.'/../view/mail/header.phtml', |
|
361 | + 'mail/footer' => __DIR__.'/../view/mail/footer.phtml', |
|
362 | + 'mail/footer.en' => __DIR__.'/../view/mail/footer.en.phtml', |
|
363 | 363 | //'startpage' => __DIR__ . '/../view/layout/startpage.phtml', |
364 | 364 | ), |
365 | 365 | // Where to look for view templates not mapped above |
366 | 366 | 'template_path_stack' => array( |
367 | - __DIR__ . '/../view', |
|
367 | + __DIR__.'/../view', |
|
368 | 368 | ), |
369 | 369 | ), |
370 | 370 | 'view_helpers' => array( |
@@ -38,9 +38,9 @@ |
||
38 | 38 | $name = "\\$namespace\\Entity\\$entityName"; |
39 | 39 | } |
40 | 40 | |
41 | - $repository = $this->dm->getRepository($name); |
|
41 | + $repository = $this->dm->getRepository($name); |
|
42 | 42 | |
43 | - if (!$repository instanceOf AbstractRepository) { |
|
43 | + if (!$repository instanceOf AbstractRepository) { |
|
44 | 44 | $eventArgs = new DoctrineMongoODM\Event\EventArgs( |
45 | 45 | array( |
46 | 46 | 'repository' => $repository, |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'entity' => $snapshot |
125 | 125 | ]); |
126 | 126 | $this->dm->getEventManager() |
127 | - ->dispatchEvent(DoctrineMongoODM\Event\RepositoryEventsSubscriber::postCreate, $eventArgs); |
|
127 | + ->dispatchEvent(DoctrineMongoODM\Event\RepositoryEventsSubscriber::postCreate, $eventArgs); |
|
128 | 128 | |
129 | 129 | $this->copy($source, $snapshot); |
130 | 130 | |
@@ -200,12 +200,12 @@ discard block |
||
200 | 200 | public function findLatest($sourceId, $isDraft = false) |
201 | 201 | { |
202 | 202 | $entity = $this->createQueryBuilder() |
203 | - ->field('snapshotEntity')->equals(new \MongoId($sourceId)) |
|
204 | - ->field('snapshotMeta.isDraft')->equals($isDraft) |
|
205 | - ->sort('snapshotMeta.dateCreated.date', 'desc') |
|
206 | - ->limit(1) |
|
207 | - ->getQuery() |
|
208 | - ->getSingleResult() |
|
203 | + ->field('snapshotEntity')->equals(new \MongoId($sourceId)) |
|
204 | + ->field('snapshotMeta.isDraft')->equals($isDraft) |
|
205 | + ->sort('snapshotMeta.dateCreated.date', 'desc') |
|
206 | + ->limit(1) |
|
207 | + ->getQuery() |
|
208 | + ->getSingleResult() |
|
209 | 209 | ; |
210 | 210 | if ($entity) { |
211 | 211 | $this->dm->getEventManager()->dispatchEvent( |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @var string |
46 | 46 | */ |
47 | - protected $language="de"; |
|
47 | + protected $language = "de"; |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * @var |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function render(ElementInterface $element) |
60 | 60 | { |
61 | - $name = $element->getName(); |
|
61 | + $name = $element->getName(); |
|
62 | 62 | if (empty($name) && $name !== 0) { |
63 | 63 | throw new \DomainException( |
64 | 64 | sprintf( |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | //$headscript->prependFile($basepath('/assets/jquery/jquery.min.js')); |
83 | 83 | |
84 | 84 | $headscript->offsetSetScript( |
85 | - '1000_tinymce_' . $this->getTheme(), |
|
85 | + '1000_tinymce_'.$this->getTheme(), |
|
86 | 86 | ' |
87 | 87 | $(document).ready(function() { |
88 | - tinyMCE.init({' . $this->additionalOptions() . ', |
|
88 | + tinyMCE.init({' . $this->additionalOptions().', |
|
89 | 89 | setup: function(editor) { |
90 | 90 | |
91 | 91 | setPlaceHolder = function(editor, show) { |
@@ -133,15 +133,15 @@ discard block |
||
133 | 133 | } |
134 | 134 | if (is_string($content)) { |
135 | 135 | |
136 | - $class = array_key_exists('class', $attributes)?$attributes['class']:''; |
|
137 | - $class .= (empty($class)?:' ') . ' tinymce_' . $this->getTheme(); |
|
136 | + $class = array_key_exists('class', $attributes) ? $attributes['class'] : ''; |
|
137 | + $class .= (empty($class) ?: ' ').' tinymce_'.$this->getTheme(); |
|
138 | 138 | $attributes['class'] = $class; |
139 | 139 | $placeHolder = ''; |
140 | 140 | $elementOptions = $element->getOptions(); |
141 | 141 | if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) { |
142 | - $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' . |
|
143 | - (empty($content)?'':'display:none;') . |
|
144 | - '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>'; |
|
142 | + $placeHolder = '<div id="placeholder-'.$name.'" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;'. |
|
143 | + (empty($content) ? '' : 'display:none;'). |
|
144 | + '">'.$this->translator->translate($elementOptions['placeholder']).'</div>'; |
|
145 | 145 | } |
146 | 146 | return |
147 | 147 | $placeHolder |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * @param $language |
180 | 180 | */ |
181 | 181 | public function setLanguage($language) { |
182 | - $this->language=$language; |
|
182 | + $this->language = $language; |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | * @param $languagePath |
189 | 189 | */ |
190 | 190 | public function setLanguagePath($languagePath) { |
191 | - $this->languagePath=$languagePath; |
|
191 | + $this->languagePath = $languagePath; |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | /** |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | * @param $name |
198 | 198 | * @param $value |
199 | 199 | */ |
200 | - public function setOption($name,$value){ |
|
200 | + public function setOption($name, $value) { |
|
201 | 201 | $this->options[$name] = $value; |
202 | 202 | |
203 | 203 | return $this; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | */ |
211 | 211 | public function setOptions($options) |
212 | 212 | { |
213 | - foreach($options as $key => $val) { |
|
213 | + foreach ($options as $key => $val) { |
|
214 | 214 | $this->setOption($key, $val); |
215 | 215 | } |
216 | 216 | } |