@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | { |
107 | 107 | $qb = $this->getPaginationQueryBuilder($params); |
108 | 108 | $cursor = $qb->hydrate(false) |
109 | - ->select('_id') |
|
110 | - ->getQuery() |
|
111 | - ->execute(); |
|
109 | + ->select('_id') |
|
110 | + ->getQuery() |
|
111 | + ->execute(); |
|
112 | 112 | |
113 | 113 | $list = new PaginationList(array_keys(ArrayUtils::iteratorToArray($cursor))); |
114 | 114 | return $list; |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | { |
138 | 138 | $auth=$this->getService('AuthenticationService'); |
139 | 139 | $qb=$this->createQueryBuilder() |
140 | - ->field("readBy")->notIn(array($auth->getUser()->getId())) |
|
141 | - ->field("job")->equals(new ObjectId($job->getId())); |
|
140 | + ->field("readBy")->notIn(array($auth->getUser()->getId())) |
|
141 | + ->field("job")->equals(new ObjectId($job->getId())); |
|
142 | 142 | return $qb->getQuery()->execute(); |
143 | 143 | } |
144 | 144 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | if (!property_exists($this, 'traits') || !property_exists($this, 'target')) { |
39 | 39 | throw new PHPUnitFrameworkException(self::class . ': ' . static::class |
40 | - . ' must define the properties $target and $traits.'); |
|
40 | + . ' must define the properties $target and $traits.'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $this->assertUsesTraits($this->traits, $this->target); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | $metadata = $file->getMetadata(); |
59 | 59 | $response->getHeaders()->addHeaderline('Content-Type', $metadata->getContentType()) |
60 | - ->addHeaderline('Content-Length', $file->getLength()); |
|
60 | + ->addHeaderline('Content-Length', $file->getLength()); |
|
61 | 61 | $response->sendHeaders(); |
62 | 62 | |
63 | 63 | $resource = $fileManager->getStream($file); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | 'entity' => $snapshot |
126 | 126 | ]); |
127 | 127 | $this->dm->getEventManager() |
128 | - ->dispatchEvent(DoctrineMongoODM\Event\RepositoryEventsSubscriber::postCreate, $eventArgs); |
|
128 | + ->dispatchEvent(DoctrineMongoODM\Event\RepositoryEventsSubscriber::postCreate, $eventArgs); |
|
129 | 129 | |
130 | 130 | $this->copy($source, $snapshot); |
131 | 131 | |
@@ -201,12 +201,12 @@ discard block |
||
201 | 201 | public function findLatest($sourceId, $isDraft = false) |
202 | 202 | { |
203 | 203 | $entity = $this->createQueryBuilder() |
204 | - ->field('snapshotEntity')->equals(new ObjectId($sourceId)) |
|
205 | - ->field('snapshotMeta.isDraft')->equals($isDraft) |
|
206 | - ->sort('snapshotMeta.dateCreated.date', 'desc') |
|
207 | - ->limit(1) |
|
208 | - ->getQuery() |
|
209 | - ->getSingleResult() |
|
204 | + ->field('snapshotEntity')->equals(new ObjectId($sourceId)) |
|
205 | + ->field('snapshotMeta.isDraft')->equals($isDraft) |
|
206 | + ->sort('snapshotMeta.dateCreated.date', 'desc') |
|
207 | + ->limit(1) |
|
208 | + ->getQuery() |
|
209 | + ->getSingleResult() |
|
210 | 210 | ; |
211 | 211 | if ($entity) { |
212 | 212 | $this->dm->getEventManager()->dispatchEvent( |
@@ -195,7 +195,7 @@ |
||
195 | 195 | ->method('isValid') |
196 | 196 | ->willReturn(true); |
197 | 197 | |
198 | - $result = $this->controller->dispatch($request); |
|
198 | + $result = $this->controller->dispatch($request); |
|
199 | 199 | |
200 | 200 | $expected = array( |
201 | 201 | 'form' => $this->formMock |
@@ -33,51 +33,51 @@ discard block |
||
33 | 33 | */ |
34 | 34 | class ManageController extends AbstractActionController |
35 | 35 | { |
36 | - private $userProfileContainer; |
|
36 | + private $userProfileContainer; |
|
37 | 37 | |
38 | - private $authService; |
|
38 | + private $authService; |
|
39 | 39 | |
40 | - private $socialProfileForm; |
|
40 | + private $socialProfileForm; |
|
41 | 41 | |
42 | - private $translator; |
|
42 | + private $translator; |
|
43 | 43 | |
44 | - private $repositories; |
|
44 | + private $repositories; |
|
45 | 45 | |
46 | - private $viewHelper; |
|
46 | + private $viewHelper; |
|
47 | 47 | |
48 | - private $hybridAuthAdapter; |
|
48 | + private $hybridAuthAdapter; |
|
49 | 49 | |
50 | 50 | private UploadHandler $manageHandler; |
51 | 51 | |
52 | 52 | /** |
53 | - * @param ContainerInterface $container |
|
54 | - * @return ManageController |
|
55 | - */ |
|
56 | - static public function factory(ContainerInterface $container) |
|
57 | - { |
|
58 | - $forms = $container->get('forms'); |
|
59 | - $userProfileContainer = $forms->get('Auth/UserProfileContainer'); |
|
60 | - $socialProfileForm = $forms->get('Auth/SocialProfiles'); |
|
61 | - $authService = $container->get('AuthenticationService'); |
|
62 | - $translator = $container->get('translator'); |
|
63 | - $repositories = $container->get('repositories'); |
|
64 | - $viewHelper = $container->get('ViewHelperManager'); |
|
65 | - $hybridAuthAdapter = $container->get('HybridAuthAdapter'); |
|
66 | - $uploadHandler = $container->get(UploadHandler::class); |
|
53 | + * @param ContainerInterface $container |
|
54 | + * @return ManageController |
|
55 | + */ |
|
56 | + static public function factory(ContainerInterface $container) |
|
57 | + { |
|
58 | + $forms = $container->get('forms'); |
|
59 | + $userProfileContainer = $forms->get('Auth/UserProfileContainer'); |
|
60 | + $socialProfileForm = $forms->get('Auth/SocialProfiles'); |
|
61 | + $authService = $container->get('AuthenticationService'); |
|
62 | + $translator = $container->get('translator'); |
|
63 | + $repositories = $container->get('repositories'); |
|
64 | + $viewHelper = $container->get('ViewHelperManager'); |
|
65 | + $hybridAuthAdapter = $container->get('HybridAuthAdapter'); |
|
66 | + $uploadHandler = $container->get(UploadHandler::class); |
|
67 | 67 | |
68 | - return new ManageController( |
|
69 | - $userProfileContainer, |
|
70 | - $authService, |
|
71 | - $repositories, |
|
72 | - $socialProfileForm, |
|
73 | - $translator, |
|
74 | - $viewHelper, |
|
75 | - $hybridAuthAdapter, |
|
68 | + return new ManageController( |
|
69 | + $userProfileContainer, |
|
70 | + $authService, |
|
71 | + $repositories, |
|
72 | + $socialProfileForm, |
|
73 | + $translator, |
|
74 | + $viewHelper, |
|
75 | + $hybridAuthAdapter, |
|
76 | 76 | $uploadHandler |
77 | - ); |
|
78 | - } |
|
77 | + ); |
|
78 | + } |
|
79 | 79 | |
80 | - public function __construct( |
|
80 | + public function __construct( |
|
81 | 81 | UserProfileContainer $userProfileContainer, |
82 | 82 | AuthenticationService $authService, |
83 | 83 | RepositoryService $repositories, |
@@ -86,19 +86,19 @@ discard block |
||
86 | 86 | HelperPluginManager $viewHelper, |
87 | 87 | HybridAuth $hybridAuthAdapter, |
88 | 88 | UploadHandler $manageHandler |
89 | - ) |
|
90 | - { |
|
91 | - $this->userProfileContainer = $userProfileContainer; |
|
92 | - $this->authService = $authService; |
|
93 | - $this->socialProfileForm = $socialProfileForm; |
|
94 | - $this->repositories = $repositories; |
|
95 | - $this->translator = $translator; |
|
96 | - $this->viewHelper = $viewHelper; |
|
97 | - $this->hybridAuthAdapter = $hybridAuthAdapter; |
|
89 | + ) |
|
90 | + { |
|
91 | + $this->userProfileContainer = $userProfileContainer; |
|
92 | + $this->authService = $authService; |
|
93 | + $this->socialProfileForm = $socialProfileForm; |
|
94 | + $this->repositories = $repositories; |
|
95 | + $this->translator = $translator; |
|
96 | + $this->viewHelper = $viewHelper; |
|
97 | + $this->hybridAuthAdapter = $hybridAuthAdapter; |
|
98 | 98 | $this->manageHandler = $manageHandler; |
99 | 99 | } |
100 | 100 | |
101 | - /** |
|
101 | + /** |
|
102 | 102 | * @return array|JsonModel |
103 | 103 | */ |
104 | 104 | public function profileAction() |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $postData = $form->getOption('use_post_array') ? $_POST : array(); |
143 | 143 | //@TODO: [ZF3] option use_files_array is false by default |
144 | 144 | //$filesData = $form->getOption('use_files_array') ? $_FILES : array(); |
145 | - $filesData = $_FILES; |
|
145 | + $filesData = $_FILES; |
|
146 | 146 | $data = array_merge($postData, $filesData); |
147 | 147 | $form->setData($data); |
148 | 148 |
@@ -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,21 +83,21 @@ 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 | 103 | 'Organizations/OrganizationsNameFieldset' => \Organizations\Factory\Form\OrganizationsNameFieldsetFactory::class, |
@@ -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 | \Organizations\Service\UploadHandler::class => [\Organizations\Service\UploadHandler::class, 'factory'], |
223 | 223 | ], |
224 | 224 | ], |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | $LINKEDIN_APP_SECRET = getenv('LINKEDIN_APP_SECRET'); |
7 | 7 | |
8 | 8 | return array( |
9 | - 'hybridauth' => array( |
|
9 | + 'hybridauth' => array( |
|
10 | 10 | "Facebook" => array ( |
11 | 11 | "enabled" => true, |
12 | 12 | "keys" => array ( "id" => $FACEBOOK_APP_ID, "secret" => $FACEBOOK_APP_SECRET ), |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | "scope" => '' |
31 | 31 | ), |
32 | 32 | "Google" => array( |
33 | - // see http://hybridauth.sourceforge.net/userguide/IDProvider_info_Google.html |
|
34 | - "enabled" => false, |
|
35 | - 'keys' => array ( "id" => '###Your Google Client-ID ###', 'secret' => '###Your GitHub Secret###'), |
|
36 | - "scope" => "https://www.googleapis.com/auth/userinfo.profile ". // optional |
|
37 | - "https://www.googleapis.com/auth/userinfo.email" , // optional |
|
38 | - "access_type" => "offline", // optional |
|
39 | - "approval_prompt" => "force", // optional |
|
33 | + // see http://hybridauth.sourceforge.net/userguide/IDProvider_info_Google.html |
|
34 | + "enabled" => false, |
|
35 | + 'keys' => array ( "id" => '###Your Google Client-ID ###', 'secret' => '###Your GitHub Secret###'), |
|
36 | + "scope" => "https://www.googleapis.com/auth/userinfo.profile ". // optional |
|
37 | + "https://www.googleapis.com/auth/userinfo.email" , // optional |
|
38 | + "access_type" => "offline", // optional |
|
39 | + "approval_prompt" => "force", // optional |
|
40 | 40 | ), |
41 | 41 | |
42 | 42 | |
@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | ), |
48 | 48 | |
49 | 49 | 'Auth' => array( |
50 | - 'first_login' => array ( |
|
51 | - 'role' => '%%role%%', // role set on the first login. |
|
52 | - 'auth_suffix' => '%%auth.suffix%%', // an auth suffix is needed, if you plan to add external apps. |
|
53 | - ), |
|
54 | - // this allows an external application to use the YAWIK API |
|
55 | - // applications[USERPOSTFIX] => AppKey |
|
50 | + 'first_login' => array ( |
|
51 | + 'role' => '%%role%%', // role set on the first login. |
|
52 | + 'auth_suffix' => '%%auth.suffix%%', // an auth suffix is needed, if you plan to add external apps. |
|
53 | + ), |
|
54 | + // this allows an external application to use the YAWIK API |
|
55 | + // applications[USERPOSTFIX] => AppKey |
|
56 | 56 | 'external_applications' => array( |
57 | 57 | '%%external.app.prefix%%' => '%%external.app.key%%', |
58 | 58 | ), |
@@ -64,8 +64,8 @@ |
||
64 | 64 | ); |
65 | 65 | |
66 | 66 | return '<script type="application/ld+json">' |
67 | - . $jsonLdProvider->toJsonLd() |
|
68 | - . '</script>'; |
|
67 | + . $jsonLdProvider->toJsonLd() |
|
68 | + . '</script>'; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |