public function actionForm($type = null, $id = null) { $options = ['modelOptions' => [], 'title' => function ($model) { if ($model->isNewRecord) { return "Create Alert"; } else { $header = 'Update Alert: ' . ' Matching ' . $model->properName($model->priority) . ' ' . ($model->remote_type == 'any' ? 'Anything' : $model->properName($model->remote_type)); } if (!empty($model->remote_for) && !($model->remote_for == 'any')) { $header .= ' for ' . $model->properName($model->remote_for); } if (!empty($model->remote_id)) { $header .= ' ' . (!$model->remote_id ? 'with Any id' : ' with id ' . $model->remote_id); } return $header; }]; $options['force'] = true; return parent::actionForm($type, $id, $options); }
public function actionForm($type = null, $id = null) { $options = ['modelOptions' => ['queryOptions' => ['with' => ['type', 'requestFor']]]]; return parent::actionForm($type, $id, $options); }