Blame view

common/modules/product/views/variant/update.php 1.52 KB
d8c1a2e0   Yarik   Big commit artbox
1
  <?php
d55d2fe0   Yarik   Multilanguage
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
      
      use common\modules\product\models\ProductStock;
      use common\modules\product\models\ProductVariant;
      use common\modules\product\models\ProductVariantLang;
      use yii\db\ActiveQuery;
      use yii\helpers\Html;
      use yii\helpers\Url;
      use yii\web\View;
      
      /**
       * @var View                 $this
       * @var ProductVariant       $model
       * @var ProductVariantLang[] $model_langs
       * @var ActiveQuery          $groups
       * @var ProductStock[]       $stocks
       */
      $this->title = Yii::t('product', 'Update {modelClass}: ', [
              'modelClass' => 'Product',
93c267f7   Yarik   Multilanguage big...
20
          ]) . ' ' . $model->product_variant_id;
d55d2fe0   Yarik   Multilanguage
21
22
23
24
25
      $this->params[ 'breadcrumbs' ][] = [
          'label' => Yii::t('product', 'Products'),
          'url'   => [ 'index' ],
      ];
      $this->params[ 'breadcrumbs' ][] = [
93c267f7   Yarik   Multilanguage big...
26
          'label' => $model->product->product_id,
d55d2fe0   Yarik   Multilanguage
27
28
29
30
31
32
33
34
35
36
37
38
39
          'url'   => [
              'view',
              'id' => $model->product->product_id,
          ],
      ];
      $this->params[ 'breadcrumbs' ][] = [
          'label' => Yii::t('product', 'Variants'),
          'url'   => Url::to([
              '/product/variant',
              'product_id' => $model->product->product_id,
          ]),
      ];
      $this->params[ 'breadcrumbs' ][] = Yii::t('product', 'Update');
d8c1a2e0   Yarik   Big commit artbox
40
41
  ?>
  <div class="product-update">
d55d2fe0   Yarik   Multilanguage
42
      
d8c1a2e0   Yarik   Big commit artbox
43
      <h1><?= Html::encode($this->title) ?></h1>
d55d2fe0   Yarik   Multilanguage
44
      
d8c1a2e0   Yarik   Big commit artbox
45
      <?= $this->render('_form', [
d55d2fe0   Yarik   Multilanguage
46
47
48
49
          'model'       => $model,
          'model_langs' => $model_langs,
          'groups'      => $groups,
          'stocks'      => $stocks,
d8c1a2e0   Yarik   Big commit artbox
50
51
52
      ]) ?>
  
  </div>