/** * Lists all EmailMessages models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => EmailMessages::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\helpers\ArrayHelper; use app\models\EmailMessages; use dosamigos\ckeditor\CKEditor; /* @var $this yii\web\View */ /* @var $model amnah\yii2\user\models\Abonnement */ /* @var $form yii\widgets\ActiveForm */ $dataList = ArrayHelper::map(EmailMessages::find()->where(['partof' => 'Abonnementen'])->asArray()->all(), 'id', 'name'); ?> <div class="abonnement-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 100]); ?> <?php echo $form->field($model, 'description')->widget(CKEditor::className(), ['options' => ['rows' => 20], 'preset' => 'basic']); ?> <?php echo $form->field($model, 'prijs')->textInput(['maxlength' => 10]); ?>