/** * Action to get the relation field options of the provided model * @param \ride\web\cms\orm\FieldService $fieldService * @param string $model Name of the model * @return null */ public function relationFieldsAction(FieldService $fieldService, $model) { if ($model) { $fields = $fieldService->getFields($model, true, true, 1); } else { $fields = array(); } $this->setJsonView(array('fields' => $fields)); }