@@ -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, |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $repo = $this->repo; |
113 | 113 | $id = $this->params('id'); |
114 | 114 | |
115 | - if(is_null($id)){ |
|
115 | + if (is_null($id)) { |
|
116 | 116 | $this->getResponse()->setStatusCode(Response::STATUS_CODE_404); |
117 | 117 | return [ |
118 | 118 | 'message' => $translator->translate('Can not access profile page without id'), |
@@ -121,20 +121,20 @@ discard block |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | $organization = $repo->find($id); |
124 | - if(!$organization instanceof Organization){ |
|
124 | + if (!$organization instanceof Organization) { |
|
125 | 125 | throw new NotFoundException($id); |
126 | 126 | } |
127 | 127 | |
128 | - if( |
|
128 | + if ( |
|
129 | 129 | Organization::PROFILE_DISABLED == $organization->getProfileSetting() |
130 | 130 | || is_null($organization->getProfileSetting()) |
131 | - ){ |
|
131 | + ) { |
|
132 | 132 | throw new UnauthorizedAccessException(/*@translate*/ 'This Organization Profile is disabled'); |
133 | 133 | } |
134 | 134 | |
135 | 135 | $result = $this->pagination([ |
136 | 136 | 'params' => [ |
137 | - 'Organization_Jobs',[ |
|
137 | + 'Organization_Jobs', [ |
|
138 | 138 | 'q', |
139 | 139 | 'organization_id' => $organization->getId(), |
140 | 140 | 'count' => $this->options['count'], |
@@ -147,13 +147,13 @@ discard block |
||
147 | 147 | ], |
148 | 148 | ]); |
149 | 149 | |
150 | - if( |
|
150 | + if ( |
|
151 | 151 | Organization::PROFILE_ACTIVE_JOBS == $organization->getProfileSetting() |
152 | - ){ |
|
152 | + ) { |
|
153 | 153 | /* @var \Zend\Paginator\Paginator $paginator */ |
154 | 154 | $paginator = $result['jobs']; |
155 | 155 | $count = $paginator->getTotalItemCount(); |
156 | - if(0===$count){ |
|
156 | + if (0 === $count) { |
|
157 | 157 | throw new UnauthorizedAccessException($this->translator->translate('This Organization Profile is disabled')); |
158 | 158 | } |
159 | 159 | } |
@@ -28,27 +28,27 @@ |
||
28 | 28 | */ |
29 | 29 | class FileController extends AbstractActionController |
30 | 30 | { |
31 | - /** |
|
32 | - * @var RepositoryService |
|
33 | - */ |
|
34 | - private $repositories; |
|
31 | + /** |
|
32 | + * @var RepositoryService |
|
33 | + */ |
|
34 | + private $repositories; |
|
35 | 35 | |
36 | - /** |
|
37 | - * @var EventManager |
|
38 | - */ |
|
39 | - private $coreFileEvents; |
|
36 | + /** |
|
37 | + * @var EventManager |
|
38 | + */ |
|
39 | + private $coreFileEvents; |
|
40 | 40 | |
41 | - public function __construct( |
|
42 | - RepositoryService $repositories, |
|
43 | - EventManager $eventManager |
|
44 | - ) |
|
45 | - { |
|
46 | - $this->repositories = $repositories; |
|
47 | - $this->coreFileEvents = $eventManager; |
|
48 | - } |
|
41 | + public function __construct( |
|
42 | + RepositoryService $repositories, |
|
43 | + EventManager $eventManager |
|
44 | + ) |
|
45 | + { |
|
46 | + $this->repositories = $repositories; |
|
47 | + $this->coreFileEvents = $eventManager; |
|
48 | + } |
|
49 | 49 | |
50 | 50 | |
51 | - protected function attachDefaultListeners() |
|
51 | + protected function attachDefaultListeners() |
|
52 | 52 | { |
53 | 53 | parent::attachDefaultListeners(); |
54 | 54 | $events = $this->getEventManager(); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $response = $this->getResponse(); |
74 | 74 | |
75 | 75 | try { |
76 | - $repository = $this->repositories->get($module . '/' . $entityName); |
|
76 | + $repository = $this->repositories->get($module.'/'.$entityName); |
|
77 | 77 | } catch (\Exception $e) { |
78 | 78 | $response->setStatusCode(404); |
79 | 79 | $this->getEvent()->setParam('exception', $e); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $this->acl($file); |
109 | 109 | |
110 | - $headers=$response->getHeaders(); |
|
110 | + $headers = $response->getHeaders(); |
|
111 | 111 | |
112 | 112 | $headers->addHeaderline('Content-Type', $file->getType()) |
113 | 113 | ->addHeaderline('Content-Length', $file->getLength()); |
@@ -26,6 +26,6 @@ |
||
26 | 26 | $repositories = $container->get('repositories'); |
27 | 27 | $coreFileEvents = $container->get('Core/File/Events'); |
28 | 28 | |
29 | - return new FileController($repositories,$coreFileEvents); |
|
29 | + return new FileController($repositories, $coreFileEvents); |
|
30 | 30 | } |
31 | 31 | } |
@@ -42,24 +42,24 @@ discard block |
||
42 | 42 | 'log' => array( |
43 | 43 | 'Core/Log' => array( |
44 | 44 | 'writers' => array( |
45 | - array( |
|
46 | - 'name' => 'stream', |
|
45 | + array( |
|
46 | + 'name' => 'stream', |
|
47 | 47 | 'priority' => 1000, |
48 | 48 | 'options' => array( |
49 | - 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
49 | + 'stream' => __DIR__ .'/../../../log/yawik.log', |
|
50 | + ), |
|
50 | 51 | ), |
51 | - ), |
|
52 | 52 | ), |
53 | 53 | ), |
54 | 54 | 'Log/Core/Mail' => array( |
55 | 55 | 'writers' => array( |
56 | - array( |
|
57 | - 'name' => 'stream', |
|
56 | + array( |
|
57 | + 'name' => 'stream', |
|
58 | 58 | 'priority' => 1000, |
59 | 59 | 'options' => array( |
60 | - 'stream' => __DIR__ .'/../../../log/mails.log', |
|
60 | + 'stream' => __DIR__ .'/../../../log/mails.log', |
|
61 | + ), |
|
61 | 62 | ), |
62 | - ), |
|
63 | 63 | ), |
64 | 64 | ), |
65 | 65 | ), |
@@ -290,12 +290,12 @@ discard block |
||
290 | 290 | ), |
291 | 291 | // Configuration of the controller service manager (Which loads controllers) |
292 | 292 | 'controllers' => array( |
293 | - 'factories' => [ |
|
294 | - 'Core/Index' => LazyControllerFactory::class, |
|
293 | + 'factories' => [ |
|
294 | + 'Core/Index' => LazyControllerFactory::class, |
|
295 | 295 | 'Core/Admin' => AdminControllerFactory::class, |
296 | - 'Core/File' => FileControllerFactory::class, |
|
296 | + 'Core/File' => FileControllerFactory::class, |
|
297 | 297 | 'Core/Content' => LazyControllerFactory::class, |
298 | - ], |
|
298 | + ], |
|
299 | 299 | ), |
300 | 300 | // Configuration of the controller plugin service manager |
301 | 301 | 'controller_plugins' => array( |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | 'paginatorservice' => 'Core/PaginatorService', |
326 | 326 | 'paginationParams' => 'Core/PaginationParams', |
327 | 327 | 'searchform' => 'Core/SearchForm', |
328 | - 'notification' => 'Notification', |
|
328 | + 'notification' => 'Notification', |
|
329 | 329 | ) |
330 | 330 | ), |
331 | 331 | // Configure the view service manager |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | ), |
424 | 424 | 'aliases' => [ |
425 | 425 | 'snippet' => \Core\View\Helper\Snippet::class, |
426 | - 'ajaxUrl' => \Core\View\Helper\AjaxUrl::class, |
|
426 | + 'ajaxUrl' => \Core\View\Helper\AjaxUrl::class, |
|
427 | 427 | 'proxy' => \Core\View\Helper\Proxy::class, |
428 | 428 | 'form_element' => 'formElement', |
429 | 429 | ], |
@@ -521,17 +521,17 @@ discard block |
||
521 | 521 | ], |
522 | 522 | |
523 | 523 | 'Core/Ajax/Events' => [ |
524 | - 'service' => 'Core/EventManager', |
|
525 | - 'event' => \Core\Listener\Events\AjaxEvent::class, |
|
524 | + 'service' => 'Core/EventManager', |
|
525 | + 'event' => \Core\Listener\Events\AjaxEvent::class, |
|
526 | 526 | ], |
527 | 527 | |
528 | - 'Core/File/Events' => [ |
|
529 | - 'service' => 'Core/EventManager', |
|
530 | - 'event' => \Core\Listener\Events\FileEvent::class, |
|
528 | + 'Core/File/Events' => [ |
|
529 | + 'service' => 'Core/EventManager', |
|
530 | + 'event' => \Core\Listener\Events\FileEvent::class, |
|
531 | 531 | 'listeners' => [ |
532 | 532 | \Core\Listener\DeleteImageSetListener::class => [\Core\Listener\Events\FileEvent::EVENT_DELETE, -1000], |
533 | 533 | ], |
534 | - ] |
|
534 | + ] |
|
535 | 535 | ], |
536 | 536 | |
537 | 537 | ); |