Completed
Push — master ( ff6fc5...793680 )
by Dmitry
40:03 queued 25:06
created

src/views/_configuration-view.php (1 issue)

Labels
Severity
1
<?php
2
3
use hipanel\widgets\Box;
4
use yii\widgets\Pjax;
5
use hipanel\helpers\Url;
6
use yii\widgets\DetailView;
7
use yii\helpers\Html;
8
9
?>
10
11
<?php if (Yii::getAlias('@part', false) && Yii::$app->user->can('part.read')) : ?>
0 ignored issues
show
The method can() does not exist on null. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

11
<?php if (Yii::getAlias('@part', false) && Yii::$app->user->/** @scrutinizer ignore-call */ can('part.read')) : ?>

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.

Loading history...
12
    <div class="row">
13
        <?php Pjax::begin(['enablePushState' => false]) ?>
14
        <div class="col-md-12">
15
            <?php $box = Box::begin(['renderBody' => false]) ?>
16
                <?php $box->beginHeader() ?>
17
                    <?= $box->renderTitle(Yii::t('hipanel:server', 'Configuration')) ?>
18
                    <?php $box->beginTools(['class' => 'box-tools pull-right']) ?>
19
                        <?= Html::a(
20
                            Yii::t('hipanel', 'Details'),
21
                            Url::toSearch('part', ['dst_name_like' => $model->name]),
22
                            ['class' => 'btn btn-box-tool']
23
                        ) ?>
24
                    <?php $box->endTools() ?>
25
                <?php $box->endHeader() ?>
26
                <?php $box->beginBody() ?>
27
                    <?= DetailView::widget([
28
                        'model' => $model->hardwareSettings,
29
                        'attributes' => $configAttrs,
30
                    ]) ?>
31
                    <hr>
32
                    <?php $url = Url::to(['@part/render-object-parts', 'id' => $model->id]) ?>
33
                        <?= Html::tag('div', '', ['class'  => 'server-parts']) ?>
34
                    <?php $this->registerJs("$('.server-parts').load('$url', function () {
35
                            $(this).closest('.box').find('.overlay').remove();
36
                        });") ?>
37
                <?php $box->endBody() ?>
38
                <div class="overlay"><i class="fa fa-refresh fa-spin"></i></div>
39
            <?php $box->end() ?>
40
        </div>
41
        <?php Pjax::end() ?>
42
    </div>
43
<?php endif ?>
44