@@ -25,7 +25,7 @@ |
||
25 | 25 | /** |
26 | 26 | * EntityContentSearch constructor. Pass search terms (query string) to model and used items to skip it by id. |
27 | 27 | * @param $terms |
28 | - * @param int|array $skipIds |
|
28 | + * @param integer $skipIds |
|
29 | 29 | */ |
30 | 30 | public function __construct($terms, $skipIds = 0) |
31 | 31 | { |
@@ -77,7 +77,7 @@ |
||
77 | 77 | $this->items[] = [ |
78 | 78 | 'title' => $item->getLocaled('title'), |
79 | 79 | 'snippet' => Text::snippet($text), |
80 | - 'uri' => '/content/read/' . $item->getPath(), |
|
80 | + 'uri' => '/content/read/'.$item->getPath(), |
|
81 | 81 | 'thumb' => $item->getPosterThumbUri() |
82 | 82 | ]; |
83 | 83 | } |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php return [ |
2 | - 'Alias' => [ |
|
3 | - 'Front' => [ |
|
4 | - '/about' => '/content/read/page/about-page' |
|
5 | - ] |
|
6 | - ], |
|
7 | - 'Callback' => [ |
|
8 | - 'Front' => [ |
|
9 | - 'Demo' => '\Apps\Controller\Front\Main' |
|
10 | - ] |
|
11 | - ] |
|
2 | + 'Alias' => [ |
|
3 | + 'Front' => [ |
|
4 | + '/about' => '/content/read/page/about-page' |
|
5 | + ] |
|
6 | + ], |
|
7 | + 'Callback' => [ |
|
8 | + 'Front' => [ |
|
9 | + 'Demo' => '\Apps\Controller\Front\Main' |
|
10 | + ] |
|
11 | + ] |
|
12 | 12 | ]; |
13 | 13 | \ No newline at end of file |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
45 | - * Labels for form |
|
46 | - */ |
|
45 | + * Labels for form |
|
46 | + */ |
|
47 | 47 | public function labels() |
48 | 48 | { |
49 | 49 | return [ |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
60 | - * Validation rules for comments settings |
|
61 | - */ |
|
60 | + * Validation rules for comments settings |
|
61 | + */ |
|
62 | 62 | public function rules() |
63 | 63 | { |
64 | 64 | return [ |
@@ -1,8 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use Ffcms\Core\Helper\Date; |
|
4 | 3 | use Ffcms\Core\Helper\HTML\Form; |
5 | -use Ffcms\Core\Helper\HTML\Table; |
|
6 | 4 | use Ffcms\Core\Helper\Url; |
7 | 5 | |
8 | 6 | /** @var \Apps\Model\Admin\Feedback\FormUpdate $model */ |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
37 | - * Labels to display edit form |
|
38 | - */ |
|
37 | + * Labels to display edit form |
|
38 | + */ |
|
39 | 39 | public function labels() |
40 | 40 | { |
41 | 41 | return [ |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * Rules to validate changes |
|
50 | - */ |
|
49 | + * Rules to validate changes |
|
50 | + */ |
|
51 | 51 | public function rules() |
52 | 52 | { |
53 | 53 | return [ |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | - * Labels for display form |
|
51 | - */ |
|
50 | + * Labels for display form |
|
51 | + */ |
|
52 | 52 | public function labels() |
53 | 53 | { |
54 | 54 | return [ |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * Form validation rules |
|
63 | - */ |
|
62 | + * Form validation rules |
|
63 | + */ |
|
64 | 64 | public function rules() |
65 | 65 | { |
66 | 66 | return [ |
@@ -29,7 +29,7 @@ |
||
29 | 29 | public function __construct($recordPost, $userId = 0) |
30 | 30 | { |
31 | 31 | $this->_post = $recordPost; |
32 | - $this->_userId = (int)$userId; |
|
32 | + $this->_userId = (int) $userId; |
|
33 | 33 | parent::__construct(); |
34 | 34 | } |
35 | 35 |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | |
27 | 27 | |
28 | 28 | /** |
29 | - * Set user data if he is logged in |
|
30 | - */ |
|
29 | + * Set user data if he is logged in |
|
30 | + */ |
|
31 | 31 | public function before() |
32 | 32 | { |
33 | 33 | if (App::$User->isAuth()) { |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
41 | - * Labels to display form |
|
42 | - */ |
|
41 | + * Labels to display form |
|
42 | + */ |
|
43 | 43 | public function labels() |
44 | 44 | { |
45 | 45 | return [ |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
54 | - * Rules to validate send form |
|
55 | - */ |
|
54 | + * Rules to validate send form |
|
55 | + */ |
|
56 | 56 | public function rules() |
57 | 57 | { |
58 | 58 | $rules = [ |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | public function __construct($captcha = true) |
22 | 22 | { |
23 | - $this->_useCaptcha = (bool)$captcha; |
|
23 | + $this->_useCaptcha = (bool) $captcha; |
|
24 | 24 | parent::__construct(); |
25 | 25 | } |
26 | 26 |
@@ -95,7 +95,7 @@ |
||
95 | 95 | |
96 | 96 | /** |
97 | 97 | * Send email notification after feedback request creation |
98 | - * @param $record |
|
98 | + * @param FeedbackPost $record |
|
99 | 99 | * @throws \Ffcms\Core\Exception\SyntaxException |
100 | 100 | */ |
101 | 101 | private function sendEmail($record) |
@@ -9,4 +9,4 @@ |
||
9 | 9 | ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']], |
10 | 10 | ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']] |
11 | 11 | ] |
12 | -]);?> |
|
13 | 12 | \ No newline at end of file |
13 | +]); ?> |
|
14 | 14 | \ No newline at end of file |
@@ -66,6 +66,9 @@ |
||
66 | 66 | ] |
67 | 67 | ]); |
68 | 68 | ?> |
69 | -<?php else: ?> |
|
69 | +<?php else { |
|
70 | + : ?> |
|
70 | 71 | <p>No additional fields is added!</p> |
71 | -<?php endif; ?> |
|
72 | 72 | \ No newline at end of file |
73 | +<?php endif; |
|
74 | +} |
|
75 | +?> |
|
73 | 76 | \ No newline at end of file |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | ?> |
28 | 28 | |
29 | 29 | <?php |
30 | -if ((int)$post->closed === 0 && \App::$User->isAuth()) { |
|
30 | +if ((int) $post->closed === 0 && \App::$User->isAuth()) { |
|
31 | 31 | $user = App::$User->identity(); |
32 | - if ($user->getId() === (int)$post->user_id) { |
|
33 | - echo '<div class="pull-right">' . |
|
34 | - Url::link(['feedback/close', $post->id, $post->hash], __('Close request'), ['class' => 'btn btn-danger']) . |
|
32 | + if ($user->getId() === (int) $post->user_id) { |
|
33 | + echo '<div class="pull-right">'. |
|
34 | + Url::link(['feedback/close', $post->id, $post->hash], __('Close request'), ['class' => 'btn btn-danger']). |
|
35 | 35 | '</div>'; |
36 | 36 | } |
37 | 37 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | </div> |
53 | 53 | <h3><?= __('Answers') ?></h3> |
54 | 54 | <hr /> |
55 | -<?php if ((int)$post->readed === 0 && ($answers === null || $answers->count() < 1)): ?> |
|
55 | +<?php if ((int) $post->readed === 0 && ($answers === null || $answers->count() < 1)): ?> |
|
56 | 56 | <p class="alert alert-warning"><?= __('This message is not properly readed by website administrators') ?></p> |
57 | 57 | <?php endif; ?> |
58 | 58 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <?php foreach ($answers as $answer): ?> |
61 | 61 | <div class="row"> |
62 | 62 | <div class="col-md-12"> |
63 | - <div class="panel <?= (int)$answer->is_admin === 1 ? 'panel-success' : 'panel-default' ?>"> |
|
63 | + <div class="panel <?= (int) $answer->is_admin === 1 ? 'panel-success' : 'panel-default' ?>"> |
|
64 | 64 | <div class="panel-heading"> |
65 | 65 | <strong><?= $answer->name ?> (<?= $answer->email ?>)</strong>, |
66 | 66 | <?= Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?> |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | <?php endif; ?> |
76 | 76 | |
77 | 77 | <br /> |
78 | -<?php if ((int)$post->closed === 0 && $model !== null): ?> |
|
78 | +<?php if ((int) $post->closed === 0 && $model !== null): ?> |
|
79 | 79 | <h3><?= __('Add answer') ?></h3> |
80 | 80 | <?php $form = new Form($model, ['class' => 'form-horizontal', 'method' => 'post']) ?> |
81 | 81 | <?= $form->start() ?> |