Completed
Pull Request — master (#136)
by Klochok
07:02 queued 03:42
created

widgets/cart/views/_orderPositionDescription.php (1 issue)

1
<?php
2
3
/**
4
 * @var $position ServerOrderProduct|ServerOrderDedicatedProduct
5
 */
6
7
use hipanel\modules\server\cart\ServerOrderDedicatedProduct;
8
use hipanel\modules\server\cart\ServerOrderProduct;
9
use hipanel\modules\server\widgets\OSFormatter;
10
use yii\helpers\Html;
11
12
?>
13
14
<?= Html::tag('span', implode('&nbsp;', [
15
    $position->getIcon(),
16
    $position->name,
17
    Html::tag('span', Yii::t('hipanel:server', 'Server ordering'), ['class' => 'text-muted']),
18
])) ?>
19
20
<?= $this->context->formatConfig([
21
    Yii::t('hipanel', 'Label') => $position->label,
22
    Yii::t('hipanel:server:order', 'CHASSIS') => $position->getModel()->label,
23
    Yii::t('hipanel:server:order', 'CPU') => $position->getModel()->cpu,
24
    Yii::t('hipanel:server:order', 'RAM') => $position->getModel()->ram,
25
    Yii::t('hipanel:server:order', 'HDD') => $position->getModel()->hdd,
26
    Yii::t('hipanel:server:order', 'SSD') => $position->getModel()->ssd,
27
    Yii::t('hipanel:server:order', 'Traffic') => $position->getModel()->traffic,
28
    Yii::t('hipanel:server:order', 'Administration') => $position->getDisplayAdministration(),
29
    Yii::t('hipanel:server:os', 'OS') => OSFormatter::widget(['osimage' => $position->getImage()]),
30
    Yii::t('hipanel:server:os', 'Soft package') => $position->getImage()->getDisplaySoftPackName(),
31
    Yii::t('hipanel:server:os', 'Panel') => $position->getImage()->getDisplayPanelName(),
32
    Yii::t('hipanel:server:order', 'Location') => $position->getDisplayLocation(),
33
]) ?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
34