@@ -132,7 +132,7 @@ |
||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /** |
| 135 | - * @param LifecycleEventArgs $eventArgs |
|
| 135 | + * @param PostFlushEventArgs $eventArgs |
|
| 136 | 136 | * @since 0.27 |
| 137 | 137 | */ |
| 138 | 138 | public function postFlush(PostFlushEventArgs $eventArgs) |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function getSubscribedEvents() |
| 50 | 50 | { |
| 51 | - if (! $this->manager->isEnabled()) { |
|
| 51 | + if (!$this->manager->isEnabled()) { |
|
| 52 | 52 | return []; |
| 53 | 53 | } |
| 54 | 54 | |
@@ -66,19 +66,19 @@ discard block |
||
| 66 | 66 | $organization = $eventArgs->getDocument(); |
| 67 | 67 | |
| 68 | 68 | // check for a organization instance |
| 69 | - if (! $organization instanceof Organization) { |
|
| 69 | + if (!$organization instanceof Organization) { |
|
| 70 | 70 | return; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | // check if the image has been changed |
| 74 | - if (! $eventArgs->hasChangedField('image')) { |
|
| 74 | + if (!$eventArgs->hasChangedField('image')) { |
|
| 75 | 75 | return; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $image = $eventArgs->getOldValue('image'); |
| 79 | 79 | |
| 80 | 80 | // check if any image existed |
| 81 | - if (! $image instanceof OrganizationImage) { |
|
| 81 | + if (!$image instanceof OrganizationImage) { |
|
| 82 | 82 | return; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -69,13 +69,13 @@ discard block |
||
| 69 | 69 | 'view_manager' => array( |
| 70 | 70 | // Map template to files. Speeds up the lookup through the template stack. |
| 71 | 71 | 'template_map' => array( |
| 72 | - 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
| 73 | - 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
| 74 | - 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
| 75 | - 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
| 76 | - 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
| 77 | - 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
| 78 | - 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
| 72 | + 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
| 73 | + 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
| 74 | + 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
| 75 | + 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
| 76 | + 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
| 77 | + 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
| 78 | + 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
| 79 | 79 | 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
| 80 | 80 | ), |
| 81 | 81 | // Where to look for view templates not mapped above |
@@ -85,20 +85,20 @@ discard block |
||
| 85 | 85 | ), |
| 86 | 86 | 'form_elements' => array( |
| 87 | 87 | 'invokables' => array( |
| 88 | - 'Organizations/form' => 'Organizations\Form\Organizations', |
|
| 89 | - 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
| 90 | - 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
| 91 | - 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
| 92 | - 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
| 93 | - 'Organizations/OrganizationsNameFieldset' => 'Organizations\Form\OrganizationsNameFieldset', |
|
| 94 | - 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
| 95 | - //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
| 96 | - 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
| 97 | - 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
| 98 | - 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
| 99 | - 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
| 100 | - 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
| 101 | - 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
| 88 | + 'Organizations/form' => 'Organizations\Form\Organizations', |
|
| 89 | + 'Organizations/OrganizationsContactForm' => 'Organizations\Form\OrganizationsContactForm', |
|
| 90 | + 'Organizations/OrganizationsNameForm' => 'Organizations\Form\OrganizationsNameForm', |
|
| 91 | + 'Organizations/OrganizationsDescriptionForm' => 'Organizations\Form\OrganizationsDescriptionForm', |
|
| 92 | + 'Organizations/OrganizationsContactFieldset' => 'Organizations\Form\OrganizationsContactFieldset', |
|
| 93 | + 'Organizations/OrganizationsNameFieldset' => 'Organizations\Form\OrganizationsNameFieldset', |
|
| 94 | + 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
| 95 | + //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
| 96 | + 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
| 97 | + 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
| 98 | + 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
| 99 | + 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
| 100 | + 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
| 101 | + 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
| 102 | 102 | |
| 103 | 103 | ), |
| 104 | 104 | 'factories' => array( |
@@ -188,15 +188,15 @@ discard block |
||
| 188 | 188 | ), |
| 189 | 189 | 'service_manager' => [ |
| 190 | 190 | 'invokables' => [ |
| 191 | - 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
| 191 | + 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
| 192 | 192 | ], |
| 193 | 193 | 'factories' => [ |
| 194 | - 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
| 195 | - 'Organizations\Repository\Event\InjectEventManagerListener' => 'Organizations\Factory\Repository\Event\InjectEventManagerListenerFactory', |
|
| 196 | - 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
| 197 | - 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
| 198 | - 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory', |
|
| 199 | - 'Organizations\ImageFileCache\ImageListener' => 'Organizations\Factory\ImageFileCache\ImageListenerFactory', |
|
| 194 | + 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory', |
|
| 195 | + 'Organizations\Repository\Event\InjectEventManagerListener' => 'Organizations\Factory\Repository\Event\InjectEventManagerListenerFactory', |
|
| 196 | + 'Organizations\ImageFileCache\Manager' => 'Organizations\Factory\ImageFileCache\ManagerFactory', |
|
| 197 | + 'Organizations\ImageFileCache\ODMListener' => 'Organizations\Factory\ImageFileCache\ODMListenerFactory', |
|
| 198 | + 'Organizations\ImageFileCache\ApplicationListener' => 'Organizations\Factory\ImageFileCache\ApplicationListenerFactory', |
|
| 199 | + 'Organizations\ImageFileCache\ImageListener' => 'Organizations\Factory\ImageFileCache\ImageListenerFactory', |
|
| 200 | 200 | ] |
| 201 | 201 | ], |
| 202 | 202 | 'event_manager' => [ |
@@ -40,11 +40,11 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $image = $event->getTarget(); |
| 42 | 42 | |
| 43 | - if (! $image instanceof OrganizationImage) { |
|
| 43 | + if (!$image instanceof OrganizationImage) { |
|
| 44 | 44 | return; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if (! $this->manager->isEnabled()) { |
|
| 47 | + if (!$this->manager->isEnabled()) { |
|
| 48 | 48 | return; |
| 49 | 49 | } |
| 50 | 50 | |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | // try get image from repository |
| 67 | 67 | $image = $this->repository->find($id); |
| 68 | 68 | |
| 69 | - if (! $image) { |
|
| 69 | + if (!$image) { |
|
| 70 | 70 | // abort if image does not exist |
| 71 | 71 | return; |
| 72 | 72 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function matchUri($uri) |
| 86 | 86 | { |
| 87 | - $pattern = '#^' . preg_quote($this->options->getUriPath(), '#') . '/[0-9a-z]/[0-9a-z]/([0-9a-z]+)\.[a-zA-Z]{3,4}$#'; |
|
| 87 | + $pattern = '#^'.preg_quote($this->options->getUriPath(), '#').'/[0-9a-z]/[0-9a-z]/([0-9a-z]+)\.[a-zA-Z]{3,4}$#'; |
|
| 88 | 88 | $matches = []; |
| 89 | 89 | preg_match($pattern, $uri, $matches); |
| 90 | 90 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | { |
| 121 | 121 | $dir = rtrim($dir, '/\\'); |
| 122 | 122 | |
| 123 | - if (! is_dir($dir)) { |
|
| 123 | + if (!is_dir($dir)) { |
|
| 124 | 124 | $this->createDirectoryRecursively(dirname($dir)); |
| 125 | 125 | |
| 126 | 126 | $oldUmask = umask(0); |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | public function __construct($options = null) |
| 47 | 47 | { |
| 48 | - $this->filePath = __DIR__ . '/../../../../../public' . $this->uriPath; |
|
| 48 | + $this->filePath = __DIR__.'/../../../../../public'.$this->uriPath; |
|
| 49 | 49 | |
| 50 | 50 | parent::__construct($options); |
| 51 | 51 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function getEventManager() |
| 60 | 60 | { |
| 61 | - if (! $this->eventManager) { |
|
| 61 | + if (!$this->eventManager) { |
|
| 62 | 62 | $this->setEventManager(new EventManager()); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | function getUri() |
| 83 | 83 | { |
| 84 | - $results = $this->getEventManager()->trigger(static::EVENT_GET_URI, $this, [], function ($uri) { |
|
| 84 | + $results = $this->getEventManager()->trigger(static::EVENT_GET_URI, $this, [], function($uri) { |
|
| 85 | 85 | return is_string($uri); |
| 86 | 86 | }); |
| 87 | 87 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | return $results->last(); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - return '/' . trim('file/Organizations.OrganizationImage/' . $this->id . "/" . urlencode($this->name),'/'); |
|
| 92 | + return '/'.trim('file/Organizations.OrganizationImage/'.$this->id."/".urlencode($this->name), '/'); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function getConfig() |
| 27 | 27 | { |
| 28 | - return ModuleConfigLoader::load(__DIR__ . '/config'); |
|
| 28 | + return ModuleConfigLoader::load(__DIR__.'/config'); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | return array( |
| 40 | 40 | 'Zend\Loader\StandardAutoloader' => array( |
| 41 | 41 | 'namespaces' => array( |
| 42 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
| 43 | - 'OrganizationsTest' => __DIR__ . '/test/' . 'OrganizationsTest' |
|
| 42 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
| 43 | + 'OrganizationsTest' => __DIR__.'/test/'.'OrganizationsTest' |
|
| 44 | 44 | ), |
| 45 | 45 | ), |
| 46 | 46 | ); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $createJobListener->attachShared($sharedManager); |
| 57 | 57 | |
| 58 | 58 | if ($e->getRequest() instanceof \Zend\Http\Request) { |
| 59 | - $eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, function (MvcEvent $event) { |
|
| 59 | + $eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, function(MvcEvent $event) { |
|
| 60 | 60 | $serviceManager = $event->getApplication() |
| 61 | 61 | ->getServiceManager(); |
| 62 | 62 | $options = $serviceManager->get('Organizations/ImageFileCacheOptions'); |