Exemple #1
0
 public function actionGetCodeTitles()
 {
     //$items = ['some', 'array', 'of', 'values' => ['associative', 'array']];
     \Yii::$app->response->format = 'json';
     $items = \app\models\CalendarCodeTitles::find()->asArray()->all();
     return $items;
 }
 public function actionGetcodetitles()
 {
     \Yii::$app->response->format = 'json';
     $items = \app\models\CalendarCodeTitles::find()->asArray()->all();
     return $items;
 }
 /**
  * Lists all CalendarCodeTitles models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => CalendarCodeTitles::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
Exemple #4
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use dosamigos\ckeditor\CKEditor;
use app\models\CalendarCodeTitles;
use yii\helpers\ArrayHelper;

/* @var $this yii\web\View */
/* @var $model app\models\EmailMessages */
/* @var $form yii\widgets\ActiveForm */

\Yii::$app->language = 'nl';

$dataList=ArrayHelper::map(CalendarCodeTitles::find()->asArray()->all(), 'code_title', 'code_title');

?>

<div class="email-messages-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'name')?>
    
    <?= $form->field($model, 'partof')?>
    
    <?= $form->field($model, 'code_title')->dropDownList($dataList,  ['prompt'=>'- kies een codetitle -']) ?>

    <?= $form->field($model, 'code_to')->dropDownList(['Nvt'=>'Nvt','dienstaanbieder'=>'dienstaanbieder (werknemer)',
                                                        'dienstafnemer'=>'dienstafnemer (werkgever)'],  ['prompt'=>'- kies een dienst -']) ?>