function PrepareModel() { $model = $this->implementation->model; $vid_imp = new video_implementation(); //$streams = $vid_imp->ReadMany(['live' => 1]); $streams = $vid_imp->ReadMany(); foreach ($streams as $video) { $model['properties']['videos']['items']['enum'][] = $video->{_id}; $model['properties']['videos']['items']['options']['enum_titles'][] = $video->title; } $model = category_implementation::ModelAddCategories($model); return $model; }
function PrepareModel() { $model = $this->implementation->model; $model = category_implementation::ModelAddCategories($model); return $model; }
function PrepareModel() { $model = $this->implementation->model; $show_imp = new show_implementation(); $shows = $show_imp->ReadMany(); $model['properties']['date']['default'] = date('Y-m-d'); $model['properties']['show_id']['enum'][] = ""; $model['properties']['show_id']['options']['enum_titles'][] = ""; foreach ($shows as $show) { $model['properties']['show_id']['enum'][] = $show->{_id}; $model['properties']['show_id']['options']['enum_titles'][] = $show->title; } $player_types = mediaPlayer::getPlayerTypes(); foreach ($player_types as $player_type) { $model['properties']['type']['enum'][] = $player_type->name; $model['properties']['type']['options']['enum_titles'][] = $player_type->title; } $model = category_implementation::ModelAddCategories($model); return $model; }