public function as_array() { $data = parent::as_array(); $data['options'] = json_decode($data['options'], true); if (!Arr::path($data, "options.title.text", false)) { Arr::set_path($data, "options.title.text", __($data['name'])); } return $data; }
/** * * @return array containing the Backbone attributes */ public function as_array() { $data = parent::as_array(); $data['options'] = json_decode($data['options'], true); return $data; }