@@ -19,7 +19,7 @@ |
||
| 19 | 19 | * |
| 20 | 20 | * @param ServiceLocatorInterface $serviceLocator |
| 21 | 21 | * |
| 22 | - * @return UsersController |
|
| 22 | + * @return \Auth\Controller\RemoveController |
|
| 23 | 23 | */ |
| 24 | 24 | public function createService(ServiceLocatorInterface $serviceLocator) |
| 25 | 25 | { |
@@ -67,13 +67,13 @@ discard block |
||
| 67 | 67 | 'view_manager' => array( |
| 68 | 68 | // Map template to files. Speeds up the lookup through the template stack. |
| 69 | 69 | 'template_map' => array( |
| 70 | - 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
| 71 | - 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
| 72 | - 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
| 73 | - 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
| 74 | - 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
| 75 | - 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
| 76 | - 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
| 70 | + 'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml', |
|
| 71 | + 'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml', |
|
| 72 | + 'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml', |
|
| 73 | + 'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml', |
|
| 74 | + 'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml', |
|
| 75 | + 'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml', |
|
| 76 | + 'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml', |
|
| 77 | 77 | 'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml', |
| 78 | 78 | ), |
| 79 | 79 | // Where to look for view templates not mapped above |
@@ -83,20 +83,20 @@ discard block |
||
| 83 | 83 | ), |
| 84 | 84 | 'form_elements' => array( |
| 85 | 85 | 'invokables' => array( |
| 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/OrganizationsNameFieldset' => 'Organizations\Form\OrganizationsNameFieldset', |
|
| 92 | - 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
| 93 | - //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
| 94 | - 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
| 95 | - 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
| 96 | - 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
| 97 | - 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
| 98 | - 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
| 99 | - 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
| 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/OrganizationsNameFieldset' => 'Organizations\Form\OrganizationsNameFieldset', |
|
| 92 | + 'Organizations/OrganizationsDescriptionFieldset' => 'Organizations\Form\OrganizationsDescriptionFieldset', |
|
| 93 | + //'Organizations/OrganizationFieldset' => 'Organizations\Form\OrganizationFieldset', |
|
| 94 | + 'Organizations/EmployeesContainer' => 'Organizations\Form\EmployeesContainer', |
|
| 95 | + 'Organizations/Employees' => 'Organizations\Form\Employees', |
|
| 96 | + 'Organizations/InviteEmployeeBar' => 'Organizations\Form\Element\InviteEmployeeBar', |
|
| 97 | + 'Organizations/Employee' => 'Organizations\Form\Element\Employee', |
|
| 98 | + 'Organizations/WorkflowSettings' => 'Organizations\Form\WorkflowSettings', |
|
| 99 | + 'Organizations/WorkflowSettingsFieldset' => 'Organizations\Form\WorkflowSettingsFieldset', |
|
| 100 | 100 | |
| 101 | 101 | ), |
| 102 | 102 | 'factories' => array( |
@@ -186,10 +186,10 @@ discard block |
||
| 186 | 186 | ), |
| 187 | 187 | 'service_manager' => [ |
| 188 | 188 | 'invokables' => [ |
| 189 | - 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
| 189 | + 'Organizations\Auth\Dependency\EmployeeListListener' => 'Organizations\Auth\Dependency\EmployeeListListener' |
|
| 190 | 190 | ], |
| 191 | 191 | 'factories' => [ |
| 192 | - 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory' |
|
| 192 | + 'Organizations\Auth\Dependency\ListListener' => 'Organizations\Factory\Auth\Dependency\ListListenerFactory' |
|
| 193 | 193 | ] |
| 194 | 194 | ], |
| 195 | 195 | 'event_manager' => [ |
@@ -60,9 +60,11 @@ |
||
| 60 | 60 | { |
| 61 | 61 | $items = []; |
| 62 | 62 | |
| 63 | - foreach ($this->repository->getUserOrganizations($user->getId(), $limit) as $organization) /* @var $organization \Organizations\Entity\Organization */ |
|
| 63 | + foreach ($this->repository->getUserOrganizations($user->getId(), $limit) as $organization) { |
|
| 64 | + /* @var $organization \Organizations\Entity\Organization */ |
|
| 64 | 65 | { |
| 65 | 66 | $name = $organization->getOrganizationName(); |
| 67 | + } |
|
| 66 | 68 | $title = $name ? $name->getName() : '**** DRAFT ****'; |
| 67 | 69 | $url = $view->url('lang/organizations/edit', ['id' => $organization->getId()]); |
| 68 | 70 | $items[] = new ListItem($title, $url); |
@@ -54,9 +54,11 @@ |
||
| 54 | 54 | return $items; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - foreach ($employees->slice(0, $limit) as $employee) /* @var $employee \Organizations\Entity\Employee */ |
|
| 57 | + foreach ($employees->slice(0, $limit) as $employee) { |
|
| 58 | + /* @var $employee \Organizations\Entity\Employee */ |
|
| 58 | 59 | { |
| 59 | 60 | $info = $employee->getUser()->getInfo(); |
| 61 | + } |
|
| 60 | 62 | $title = $info->getDisplayName(); |
| 61 | 63 | $items[] = new ListItem($title); |
| 62 | 64 | } |
@@ -10,20 +10,20 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | return array( |
| 12 | 12 | 'doctrine' => array( |
| 13 | - 'driver' => array( |
|
| 13 | + 'driver' => array( |
|
| 14 | 14 | 'odm_default' => array( |
| 15 | 15 | 'drivers' => array( |
| 16 | 16 | 'Applications\Entity' => 'annotation', |
| 17 | 17 | ), |
| 18 | 18 | ), |
| 19 | 19 | 'annotation' => array( |
| 20 | - /* |
|
| 20 | + /* |
|
| 21 | 21 | * All drivers (except DriverChain) require paths to work on. You |
| 22 | 22 | * may set this value as a string (for a single path) or an array |
| 23 | 23 | * for multiple paths. |
| 24 | 24 | * example https://github.com/doctrine/DoctrineORMModule |
| 25 | 25 | */ |
| 26 | - 'paths' => array( __DIR__ . '/../src/Applications/Entity') |
|
| 26 | + 'paths' => array( __DIR__ . '/../src/Applications/Entity') |
|
| 27 | 27 | ), |
| 28 | 28 | ), |
| 29 | 29 | 'eventmanager' => array( |
@@ -63,16 +63,16 @@ discard block |
||
| 63 | 63 | 'Applications/Options/ModuleOptions' => 'Applications\Options\ModuleOptions', |
| 64 | 64 | ), |
| 65 | 65 | 'factories' => array( |
| 66 | - 'Applications/Options' => 'Applications\Factory\ModuleOptionsFactory', |
|
| 67 | - 'ApplicationRepository' => 'Applications\Repository\Service\ApplicationRepositoryFactory', |
|
| 68 | - 'ApplicationMapper' => 'Applications\Repository\Service\ApplicationMapperFactory', |
|
| 69 | - 'EducationMapper' => 'Applications\Repository\Service\EducationMapperFactory', |
|
| 70 | - 'Applications/Listener/ApplicationCreated' => 'Applications\Factory\Listener\EventApplicationCreatedFactory', |
|
| 71 | - 'Applications/Listener/ApplicationStatusChangePre' => 'Applications\Factory\Listener\StatusChangeFactory', |
|
| 72 | - 'Applications\Auth\Dependency\ListListener' => 'Applications\Factory\Auth\Dependency\ListListenerFactory' |
|
| 66 | + 'Applications/Options' => 'Applications\Factory\ModuleOptionsFactory', |
|
| 67 | + 'ApplicationRepository' => 'Applications\Repository\Service\ApplicationRepositoryFactory', |
|
| 68 | + 'ApplicationMapper' => 'Applications\Repository\Service\ApplicationMapperFactory', |
|
| 69 | + 'EducationMapper' => 'Applications\Repository\Service\EducationMapperFactory', |
|
| 70 | + 'Applications/Listener/ApplicationCreated' => 'Applications\Factory\Listener\EventApplicationCreatedFactory', |
|
| 71 | + 'Applications/Listener/ApplicationStatusChangePre' => 'Applications\Factory\Listener\StatusChangeFactory', |
|
| 72 | + 'Applications\Auth\Dependency\ListListener' => 'Applications\Factory\Auth\Dependency\ListListenerFactory' |
|
| 73 | 73 | ), |
| 74 | 74 | 'aliases' => [ |
| 75 | - 'Applications/Listener/ApplicationStatusChangePost' => 'Applications/Listener/ApplicationStatusChangePre' |
|
| 75 | + 'Applications/Listener/ApplicationStatusChangePost' => 'Applications/Listener/ApplicationStatusChangePre' |
|
| 76 | 76 | ] |
| 77 | 77 | ), |
| 78 | 78 | 'controllers' => array( |
@@ -170,25 +170,25 @@ discard block |
||
| 170 | 170 | ), |
| 171 | 171 | 'form_elements' => array( |
| 172 | 172 | 'invokables' => array( |
| 173 | - 'Applications/Mail' => 'Applications\Form\Mail', |
|
| 174 | - 'Applications/BaseFieldset' => 'Applications\Form\BaseFieldset', |
|
| 175 | - 'Applications/SettingsFieldset' => 'Applications\Form\SettingsFieldset', |
|
| 176 | - 'Applications/CommentForm' => 'Applications\Form\CommentForm', |
|
| 177 | - 'Applications/CommentFieldset' => 'Applications\Form\CommentFieldset', |
|
| 178 | - 'Applications/Apply' => 'Applications\Form\Apply', |
|
| 179 | - 'Applications/Contact' => 'Applications\Form\ContactContainer', |
|
| 180 | - 'Applications/Base' => 'Applications\Form\Base', |
|
| 181 | - 'Applications/Facts' => 'Applications\Form\Facts', |
|
| 182 | - 'Applications/FactsFieldset' => 'Applications\Form\FactsFieldset', |
|
| 183 | - 'Applications/Attributes' => 'Applications\Form\Attributes', |
|
| 184 | - 'Applications/Filter' => 'Applications\Form\FilterApplication', |
|
| 185 | - 'href' => 'Applications\Form\Element\Ref', |
|
| 186 | - ), |
|
| 173 | + 'Applications/Mail' => 'Applications\Form\Mail', |
|
| 174 | + 'Applications/BaseFieldset' => 'Applications\Form\BaseFieldset', |
|
| 175 | + 'Applications/SettingsFieldset' => 'Applications\Form\SettingsFieldset', |
|
| 176 | + 'Applications/CommentForm' => 'Applications\Form\CommentForm', |
|
| 177 | + 'Applications/CommentFieldset' => 'Applications\Form\CommentFieldset', |
|
| 178 | + 'Applications/Apply' => 'Applications\Form\Apply', |
|
| 179 | + 'Applications/Contact' => 'Applications\Form\ContactContainer', |
|
| 180 | + 'Applications/Base' => 'Applications\Form\Base', |
|
| 181 | + 'Applications/Facts' => 'Applications\Form\Facts', |
|
| 182 | + 'Applications/FactsFieldset' => 'Applications\Form\FactsFieldset', |
|
| 183 | + 'Applications/Attributes' => 'Applications\Form\Attributes', |
|
| 184 | + 'Applications/Filter' => 'Applications\Form\FilterApplication', |
|
| 185 | + 'href' => 'Applications\Form\Element\Ref', |
|
| 186 | + ), |
|
| 187 | 187 | 'factories' => array( |
| 188 | 188 | 'Applications/ContactImage' => 'Applications\Factory\Form\ContactImageFactory', |
| 189 | 189 | 'Applications/Attachments' => 'Applications\Factory\Form\AttachmentsFactory', |
| 190 | 190 | ), |
| 191 | - ), |
|
| 191 | + ), |
|
| 192 | 192 | |
| 193 | 193 | 'form_elements_config' => array( |
| 194 | 194 | 'Applications/Apply' => array( |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | foreach ($this->repository->getUserApplications($user->getId(), $limit) as $application) /* @var $application \Applications\Entity\Application */ |
| 64 | 64 | { |
| 65 | 65 | $title = $application->getJob()->getTitle(); |
| 66 | - $title .= ' ('. $view->dateFormat($application->getDateCreated()) . ')'; |
|
| 66 | + $title .= ' ('.$view->dateFormat($application->getDateCreated()).')'; |
|
| 67 | 67 | $url = $view->url('lang/applications/detail', ['id' => $application->getId()]); |
| 68 | 68 | $items[] = new ListItem($title, $url); |
| 69 | 69 | } |
@@ -60,9 +60,11 @@ |
||
| 60 | 60 | { |
| 61 | 61 | $items = []; |
| 62 | 62 | |
| 63 | - foreach ($this->repository->getUserApplications($user->getId(), $limit) as $application) /* @var $application \Applications\Entity\Application */ |
|
| 63 | + foreach ($this->repository->getUserApplications($user->getId(), $limit) as $application) { |
|
| 64 | + /* @var $application \Applications\Entity\Application */ |
|
| 64 | 65 | { |
| 65 | 66 | $title = $application->getJob()->getTitle(); |
| 67 | + } |
|
| 66 | 68 | $title .= ' ('. $view->dateFormat($application->getDateCreated()) . ')'; |
| 67 | 69 | $url = $view->url('lang/applications/detail', ['id' => $application->getId()]); |
| 68 | 70 | $items[] = new ListItem($title, $url); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | foreach ($this->repository->getUserJobs($user->getId(), $limit) as $job) /* @var $job \Jobs\Entity\Job */ |
| 64 | 64 | { |
| 65 | 65 | $title = $job->getTitle() ?: $view->translate('untitled'); |
| 66 | - $title .= ' ('. $view->dateFormat($job->getDateCreated(), 'short', 'none') . ')'; |
|
| 66 | + $title .= ' ('.$view->dateFormat($job->getDateCreated(), 'short', 'none').')'; |
|
| 67 | 67 | $url = $view->url('lang/jobs/manage', ['action' => 'edit'], [ |
| 68 | 68 | 'query' => [ |
| 69 | 69 | 'id' => $job->getId() |
@@ -60,9 +60,11 @@ |
||
| 60 | 60 | { |
| 61 | 61 | $items = []; |
| 62 | 62 | |
| 63 | - foreach ($this->repository->getUserJobs($user->getId(), $limit) as $job) /* @var $job \Jobs\Entity\Job */ |
|
| 63 | + foreach ($this->repository->getUserJobs($user->getId(), $limit) as $job) { |
|
| 64 | + /* @var $job \Jobs\Entity\Job */ |
|
| 64 | 65 | { |
| 65 | 66 | $title = $job->getTitle() ?: $view->translate('untitled'); |
| 67 | + } |
|
| 66 | 68 | $title .= ' ('. $view->dateFormat($job->getDateCreated(), 'short', 'none') . ')'; |
| 67 | 69 | $url = $view->url('lang/jobs/manage', ['action' => 'edit'], [ |
| 68 | 70 | 'query' => [ |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | |
| 57 | 57 | protected function attachDefaultListeners() |
| 58 | 58 | { |
| 59 | - $this->getEventManager()->attach(static::EVENT_REMOVE_ITEMS, function (EventInterface $event) { |
|
| 59 | + $this->getEventManager()->attach(static::EVENT_REMOVE_ITEMS, function(EventInterface $event) { |
|
| 60 | 60 | $user = $event->getParam('user'); |
| 61 | 61 | foreach ($this->getLists() as $list) { |
| 62 | 62 | foreach ($list->getEntities($user) as $entity) { |
@@ -41,9 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | - * @param User $user |
|
| 45 | - * @param Router $router |
|
| 46 | - * @return ListInterface[] |
|
| 44 | + * @return \Zend\EventManager\ResponseCollection |
|
| 47 | 45 | */ |
| 48 | 46 | public function getLists() |
| 49 | 47 | { |
@@ -52,8 +50,7 @@ discard block |
||
| 52 | 50 | |
| 53 | 51 | /** |
| 54 | 52 | * @param User $user |
| 55 | - * @param Router $router |
|
| 56 | - * @return \Zend\EventManager\ResponseCollection |
|
| 53 | + * @return boolean |
|
| 57 | 54 | */ |
| 58 | 55 | public function removeItems(User $user) |
| 59 | 56 | { |