public function toJson() { return Json::encode($this->_data); }
/** * @return string json encoded field options */ public function exportFields() { return Json::encode($this->getFields(), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); }
public function toJson() { return Json::encode($this->toArray()); }
public function redirectNext($data, $form) { if (Mindy::app()->request->getIsAjax()) { echo Json::encode(['status' => 'success', 'content' => $this->renderTemplate($this->successTemplate, ['data' => $data, 'form' => $form])]); Mindy::app()->end(); } else { list($route, $params) = $this->getNextRoute($data, $form); if ($route && $params) { $this->redirect($route, $params); } } }
public function renderInput() { list($choices, $all) = $this->makeChoices(); $selected = $this->getSelected(); return $this->renderTemplate('custom_relation/field.html', ['choices' => $choices, 'all' => Json::encode($all), 'name' => $this->getHtmlName(), 'id' => $this->getHtmlId(), 'field' => $this->field, 'model' => $this->getForm()->getInstance(), 'selected' => Json::encode($selected), 'field_name' => $this->getName()]); }
public function getDbPrepValue() { return is_string($this->value) ? $this->value : Json::encode($this->value); }