1 | <?php |
||
2 | |||
3 | use Ffcms\Core\Helper\Type\Str; |
||
4 | use Ffcms\Templex\Url\Url; |
||
5 | use Ffcms\Core\Helper\Date; |
||
6 | |||
7 | /** @var \Apps\ActiveRecord\Profile[]|\Illuminate\Support\Collection $records */ |
||
8 | /** @var array $pagination */ |
||
9 | /** @var \Ffcms\Templex\Template\Template $this */ |
||
10 | |||
11 | $this->layout('_layouts/default', [ |
||
12 | 'title' => __('Profile list'), |
||
13 | 'breadcrumbs' => [ |
||
14 | Url::to('main/index') => __('Main'), |
||
15 | Url::to('application/index') => __('Applications'), |
||
16 | __('Profile') |
||
17 | ] |
||
18 | ]); |
||
19 | ?> |
||
20 | |||
21 | <?php $this->start('body') ?> |
||
22 | |||
23 | <?= $this->insert('profile/_tabs') ?> |
||
24 | |||
25 | <h1><?= __('Profile list') ?></h1> |
||
26 | <?php |
||
27 | $table = $this->table(['class' => 'table table-striped']) |
||
28 | ->head([ |
||
29 | ['text' => '#'], |
||
30 | ['text' => 'login'], |
||
31 | ['text' => 'email'], |
||
32 | ['text' => __('Nickname')], |
||
33 | ['text' => __('Birthday')], |
||
34 | ['text' => __('Rating')], |
||
35 | ['text' => __('Actions'), 'properties' => ['class' => 'text-center']] |
||
36 | ]); |
||
37 | |||
38 | foreach ($records as $profile) { |
||
39 | $table->row([ |
||
40 | ['text' => $profile->id], |
||
41 | ['text' => $profile->user->login], |
||
42 | ['text' => $profile->user->email], |
||
43 | ['text' => $profile->nick], |
||
44 | ['text' => Str::startsWith('0000-', $profile->birthday) ? __('None') : Date::convertToDatetime($profile->birthday)], |
||
45 | ['text' => ($profile->rating > 0 ? '+' : null) . $profile->rating], |
||
46 | ['text' => $this->bootstrap()->btngroup(['class' => 'btn-group btn-group-sm']) |
||
0 ignored issues
–
show
|
|||
47 | ->add('<i class="fa fa-pencil"></i>', ['profile/update', [$profile->id]], ['html' => true, 'class' => 'btn btn-primary']) |
||
48 | ->add('<i class="fa fa-trash-o"></i>', ['user/delete', [$profile->user->id]], ['html' => true, 'class' => 'btn btn-danger']) |
||
49 | ->display(), 'html' => true, 'properties' => ['class' => 'text-center']] |
||
50 | ]); |
||
51 | } |
||
52 | ?> |
||
53 | |||
54 | <div class="table-responsive"> |
||
55 | <?= $table->display() ?> |
||
56 | </div> |
||
57 | |||
58 | <?= $this->bootstrap()->pagination($pagination['url'], ['class' => 'pagination justify-content-center']) |
||
59 | ->size($pagination['total'], $pagination['page'], $pagination['step']) |
||
60 | ->display(); ?> |
||
61 | |||
62 | <?php $this->stop() ?> |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.