1 | <?php |
||
2 | |||
3 | use Ffcms\Core\Helper\Date; |
||
4 | use Ffcms\Core\Helper\Simplify; |
||
5 | use Ffcms\Core\Helper\Type\Str; |
||
6 | use Ffcms\Templex\Url\Url; |
||
7 | |||
8 | /** @var Apps\Model\Admin\Comments\FormCommentDelete $model */ |
||
9 | /** @var string $type */ |
||
10 | /** @var \Ffcms\Templex\Template\Template $this */ |
||
11 | |||
12 | $this->layout('_layouts/default', [ |
||
13 | 'title' => __('Publish comments'), |
||
14 | 'breadcrumbs' => [ |
||
15 | Url::to('main/index') => __('Main'), |
||
16 | Url::to('widget/index') => __('Widgets'), |
||
17 | Url::to('comments/index') => __('Comments'), |
||
18 | __('Publish comments and answers') |
||
19 | ] |
||
20 | ]); |
||
21 | $records = $model->getRecord(); |
||
22 | ?> |
||
23 | |||
24 | <?php $this->start('body') ?> |
||
25 | |||
26 | <?= $this->insert('comments/_tabs') ?> |
||
0 ignored issues
–
show
|
|||
27 | |||
28 | <h1><?= __('Publish comments and answers') ?></h1> |
||
29 | <?= __('Are you sure to moderate and make public this comments and answers?') ?> |
||
30 | |||
31 | <?php |
||
32 | $table = $this->table(['class' => 'table table-striped']) |
||
33 | ->head([ |
||
34 | ['text' => '#'], |
||
35 | ['text' => __('Message')], |
||
36 | ['text' => __('Author')], |
||
37 | ['text' => __('Date')] |
||
38 | ]); |
||
39 | foreach ($records as $item) { |
||
40 | $table->row([ |
||
41 | ['text' => $item->id], |
||
42 | ['text' => Str::sub(\App::$Security->strip_tags($item->message), 0, 50)], |
||
43 | ['text' => Simplify::parseUserLink($item->user_id, $item->guest_name, 'user/update'), 'html' => true], |
||
44 | ['text' => Date::convertToDatetime($item->created_at, Date::FORMAT_TO_HOUR)] |
||
45 | ]); |
||
46 | } |
||
47 | |||
48 | ?> |
||
49 | <div class="table-responsive"><?= $table->display() ?></div> |
||
50 | |||
51 | <?php $form = $this->form($model) ?> |
||
52 | <?= $form->start() ?> |
||
53 | |||
54 | <?= $form->button()->submit(__('Publish'), ['class' => 'btn btn-warning'])?> |
||
55 | |||
56 | <?= $form->stop() ?> |
||
57 | |||
58 | <?php $this->stop() ?> |
||
59 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.