create.php 1.25 KB
<?php
    
    use artbox\catalog\models\Product;
    use artbox\catalog\models\ProductLang;
    use artbox\catalog\models\ProductOptionGroupCompl;
    use artbox\catalog\models\ProductOptionGroupExcl;
    use yii\helpers\Html;
    use yii\web\View;
    use yiister\gentelella\widgets\Panel;
    
    /**
     * @var ProductLang[]             $modelLangs
     * @var Product                   $model
     * @var View                      $this
     * @var ProductOptionGroupCompl[] $groups_compl
     * @var ProductOptionGroupExcl[]  $groups_excl
     */
    
    $this->title = Yii::t('catalog', 'Create Product');
    $this->params[ 'breadcrumbs' ][] = [
        'label' => Yii::t('catalog', 'Products'),
        'url'   => [ 'index' ],
    ];
    $this->params[ 'breadcrumbs' ][] = $this->title;
?>
<div class="product-create">
    
    <?php
        $xPanel = Panel::begin(
            [
                'header' => Html::encode($this->title),
            ]
        );
    ?>
    
    <?= $this->render(
        '_form',
        [
            'model'        => $model,
            'modelLangs'   => $modelLangs,
            'groups_compl' => $groups_compl,
            'groups_excl'  => $groups_excl,
        ]
    ) ?>
    
    <?php
        $xPanel::end();
    ?>

</div>