<?php use pavlinter\admmailing\Module; use yii\helpers\Html; /* @var $this yii\web\View */ /* @var $model \pavlinter\admmailing\models\Mailing */ Yii::$app->i18n->disableDot(); $this->title = Yii::t('adm-mailing', 'Update Mailing: ') . ' ' . $model->title; $this->params['breadcrumbs'][] = ['label' => Yii::t('adm-mailing', 'Mailings'), 'url' => ['index']]; $this->params['breadcrumbs'][] = Yii::t('adm-mailing', 'Update'); Yii::$app->i18n->resetDot(); ?> <div class="mailing-update"> <?php echo Module::trasnalateLink(); ?> <h1><?php echo Html::encode($this->title); ?> </h1> <?php echo $this->render('_form', ['model' => $model]); ?> </div>
/** * Finds the Mailing model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Mailing the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { $model = Module::getInstance()->manager->createMailingQuery('find')->with(['translations'])->where(['id' => $id])->one(); if ($model !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }