'name' => 'videoFiles',
'title' => 'Видео: mp4, mov, avi',
'type' => FileInput::className(),
- 'options' => function ($data) use ($model) {
+ 'options' => function ($data) {
$videoUrl = null;
- if (!empty($model['id'])) {
+ if (!empty($data['id'])) {
$videoUrl = Files::find()
->select('url')
->where([
'entity' => WriteOffsProductsErp::WRITE_OFFS_VIDEO,
- 'entity_id' => $model['id']
+ 'entity_id' => $data['id']
])
->scalar();
}
-var_dump($model['id']);die();
+var_dump($data['id'], $videoUrl);die();
return [
'options' => [
'multiple' => false,