<?php
    
    use yii\helpers\Html;
    
    /**
     * @var yii\web\View $this
     * @var common\models\CategoryToPurpose $model
     * @var array $purposes
     * @var array $categories
     **/
    
    $this->title = 'Обновить изображение '.$model->category->lang->name.' '.$model->purpose->lang->value;
    $this->params[ 'breadcrumbs' ][] = [
        'label' => Yii::t('app', 'Category To Purposes'),
        'url'   => [ 'index' ],
    ];
    $this->params[ 'breadcrumbs' ][] = [
        'label' => $model->category->lang->name.' '.$model->purpose->lang->value,
        'url'   => [
            'view',
            'category_id' => $model->category_id,
            'purpose_id'  => $model->purpose_id,
        ],
    ];
    $this->params[ 'breadcrumbs' ][] = Yii::t('app', 'Update');
?>
<div class="category-to-purpose-update">
    
    <h1><?= Html::encode($this->title) ?></h1>
    
    <?= $this->render(
        '_form',
        [
            'model' => $model,
            'categories' => $categories,
            'purposes'   => $purposes,
        ]
    ) ?>

</div>
