@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | if ($exception instanceof UnauthorizedImageAccessException) { |
58 | 58 | $image = __DIR__ . '/../../../../../public/images/unauthorized-access.png'; |
59 | 59 | $response->setStatusCode(Response::STATUS_CODE_403) |
60 | - ->setContent(file_get_contents($image)) |
|
61 | - ->getHeaders() |
|
62 | - ->addHeaderLine('Content-Type', 'image/png'); |
|
60 | + ->setContent(file_get_contents($image)) |
|
61 | + ->getHeaders() |
|
62 | + ->addHeaderLine('Content-Type', 'image/png'); |
|
63 | 63 | $e->stopPropagation(); |
64 | 64 | $response->sendHeaders(); |
65 | 65 | //echo file_get_contents($image); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | $application = $e->getApplication(); |
73 | - $auth = $application->getServiceManager()->get('AuthenticationService'); |
|
73 | + $auth = $application->getServiceManager()->get('AuthenticationService'); |
|
74 | 74 | |
75 | 75 | if (!$auth->hasIdentity()) { |
76 | 76 | $routeMatch = $e->getRouteMatch(); |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | $model->setTemplate($this->getExceptionTemplate()); |
103 | 103 | $e->setResult($model); |
104 | 104 | |
105 | - // $statusCode = $response->getStatusCode(); |
|
106 | - // if ($statusCode === 200) { |
|
105 | + // $statusCode = $response->getStatusCode(); |
|
106 | + // if ($statusCode === 200) { |
|
107 | 107 | $response->setStatusCode(Response::STATUS_CODE_403); |
108 | - // } |
|
108 | + // } |
|
109 | 109 | } |
110 | 110 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | $queryBuilder/*->expr()*/->addOr($queryBuilder->expr()->field('permissions.view')->equals($this->user->getId())) |
51 | - ->addOr($queryBuilder->expr()->field('status.name')->equals(Status::PUBLIC_TO_ALL)) |
|
51 | + ->addOr($queryBuilder->expr()->field('status.name')->equals(Status::PUBLIC_TO_ALL)) |
|
52 | 52 | ; |
53 | 53 | //$q = $queryBuilder->getQuery()->debug(); |
54 | 54 |
@@ -10,10 +10,10 @@ |
||
10 | 10 | use Core\Entity\IdentifiableEntityInterface; |
11 | 11 | |
12 | 12 | interface CvInterface extends EntityInterface, |
13 | - IdentifiableEntityInterface, |
|
14 | - DraftableEntityInterface, |
|
15 | - PermissionsAwareInterface, |
|
16 | - ModificationDateAwareEntityInterface |
|
13 | + IdentifiableEntityInterface, |
|
14 | + DraftableEntityInterface, |
|
15 | + PermissionsAwareInterface, |
|
16 | + ModificationDateAwareEntityInterface |
|
17 | 17 | { |
18 | 18 | |
19 | 19 | /** |
@@ -24,8 +24,8 @@ |
||
24 | 24 | public function init() |
25 | 25 | { |
26 | 26 | $this->setName('education') |
27 | - ->setHydrator(new EntityHydrator()) |
|
28 | - ->setObject(new EducationEntity()); |
|
27 | + ->setHydrator(new EntityHydrator()) |
|
28 | + ->setObject(new EducationEntity()); |
|
29 | 29 | |
30 | 30 | $this->add( |
31 | 31 | array( |
@@ -52,8 +52,8 @@ |
||
52 | 52 | public function init() |
53 | 53 | { |
54 | 54 | $this->setName('preferredJob') |
55 | - ->setHydrator(new EntityHydrator()) |
|
56 | - ->setObject(new PreferredJob()); |
|
55 | + ->setHydrator(new EntityHydrator()) |
|
56 | + ->setObject(new PreferredJob()); |
|
57 | 57 | |
58 | 58 | $this->add( |
59 | 59 | array( |
@@ -24,8 +24,8 @@ |
||
24 | 24 | public function init() |
25 | 25 | { |
26 | 26 | $this->setName('employment') |
27 | - ->setHydrator(new EntityHydrator()) |
|
28 | - ->setObject(new EmploymentEntity()); |
|
27 | + ->setHydrator(new EntityHydrator()) |
|
28 | + ->setObject(new EmploymentEntity()); |
|
29 | 29 | |
30 | 30 | $this->add( |
31 | 31 | array( |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | $collection[] = $this->newEntry; |
81 | 81 | $form = $this->buildForm($key, $this->newEntry); |
82 | 82 | $eventManager = $form->getEventManager(); |
83 | - $eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) { |
|
83 | + $eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) { |
|
84 | 84 | if (!$event->getParam('isValid')) { |
85 | 85 | $collection->removeElement($this->newEntry); |
86 | 86 | } |
87 | 87 | }); |
88 | - $eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) { |
|
88 | + $eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) { |
|
89 | 89 | $this->setupForm($event->getTarget(), $collection->indexOf($this->newEntry)); |
90 | 90 | }); |
91 | 91 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | - /** |
|
120 | + /** |
|
121 | 121 | * @see \Core\Form\Element\ViewHelperProviderInterface::getViewHelper() |
122 | 122 | */ |
123 | 123 | public function getViewHelper() |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | */ |
222 | 222 | protected function setupForm(CoreForm $form, $key) |
223 | 223 | { |
224 | - $form->setAttribute('action', sprintf('?form=%s', $this->formatAction($key))) |
|
224 | + $form->setAttribute('action', sprintf('?form=%s', $this->formatAction($key))) |
|
225 | 225 | ->setAttribute('data-entry-key', $key) |
226 | 226 | ->setOption('control_buttons', [[ |
227 | 227 | 'class' => 'btn-danger form-collection-container-remove-button', |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $translator = $this->getTranslator(); |
61 | 61 | $formContainerHelper = $view->formContainer(); |
62 | 62 | $formsMarkup = ''; |
63 | - $formTemplateWrapper = '<div class="form-collection-container-form"> |
|
63 | + $formTemplateWrapper = '<div class="form-collection-container-form"> |
|
64 | 64 | '. ($this->displayRemoveButton ? '<button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">' . $translator->translate('Remove') . '</button>' : '') . ' |
65 | 65 | %s |
66 | 66 | </div>'; |
@@ -71,16 +71,16 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | $templateForm = $container->getTemplateForm(); |
74 | - $templateMarkup = sprintf( |
|
74 | + $templateMarkup = sprintf( |
|
75 | 75 | $view->formCollection()->getTemplateWrapper(), |
76 | 76 | $view->escapeHtmlAttr(sprintf($formTemplateWrapper, $formContainerHelper->renderElement($templateForm, $layout, $parameter))) |
77 | 77 | ); |
78 | 78 | |
79 | - return sprintf('<div class="form-collection-container" data-new-entry-key="%s" data-remove-action="%s" data-remove-question="%s"> |
|
79 | + return sprintf('<div class="form-collection-container" data-new-entry-key="%s" data-remove-action="%s" data-remove-question="%s"> |
|
80 | 80 | <h3>%s</h3> |
81 | 81 | %s%s%s |
82 | 82 | </div>', |
83 | - CollectionContainer::NEW_ENTRY, |
|
83 | + CollectionContainer::NEW_ENTRY, |
|
84 | 84 | $container->formatAction('remove'), |
85 | 85 | $translator->translate('Really remove?'), |
86 | 86 | $container->getLabel(), |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | ); |
91 | 91 | } |
92 | 92 | /** |
93 | - * @param boolean $displayRemoveButton |
|
94 | - * @return FormCollectionContainer |
|
93 | + * @param boolean $displayRemoveButton |
|
94 | + * @return FormCollectionContainer |
|
95 | 95 | * @since 0.26 |
96 | - */ |
|
97 | - public function setDisplayRemoveButton($displayRemoveButton) |
|
98 | - { |
|
99 | - $this->displayRemoveButton = (bool)$displayRemoveButton; |
|
96 | + */ |
|
97 | + public function setDisplayRemoveButton($displayRemoveButton) |
|
98 | + { |
|
99 | + $this->displayRemoveButton = (bool)$displayRemoveButton; |
|
100 | 100 | |
101 | - return $this; |
|
102 | - } |
|
101 | + return $this; |
|
102 | + } |
|
103 | 103 | } |
@@ -16,6 +16,6 @@ |
||
16 | 16 | $container = new \Core\Form\CollectionContainer('CvEmploymentForm', new \Cv\Entity\Employment()); |
17 | 17 | $container->setLabel(/*@translate */ 'Employment history'); |
18 | 18 | |
19 | - return $container; |
|
19 | + return $container; |
|
20 | 20 | } |
21 | 21 | } |