<?php
use yii\helpers\ArrayHelper;

use common\modules\school\models\Courses;

$elements = [
    'title'	=> ['type' => 'text'],
    'video_id'	=> ['type' => 'text'],
    'text' => ['type' => 'textarea'],
    'course_id' => [
            'type' => 'dropdownlist',
            'items' => ArrayHelper::map(Courses::find()->all(), 'id', 'title'),
        ],
    'number'	=> ['type' => 'text'],
];

return [
    'activeForm'=>[
        'id' => 'lesson-form',
    ],
    'elements'       => $elements,
    'buttons' => [
        'submit' => ['type' => 'submit', 'value' => 'Cохранить']
    ]
];

