Ejemplo n.º 1
0
 /**
  * Constructor
  *
  * @param array|null $data
  */
 public function __construct($data = null)
 {
     parent::__construct($data);
     $this->name(__d('module_text', 'Text2'));
     $this->description(__d('module_text', 'Arbitrary text or Html.'));
     $this->group(__d('module_text', 'General2'));
     $this->path(__FILE__);
 }
Ejemplo n.º 2
0
 protected function _renderModule(Module $form, $error = false)
 {
     $rendered = $form->renderForm();
     $this->set(['error' => $error ? 1 : 0, 'module' => $rendered, '_serialize' => ['error', 'module']]);
 }
Ejemplo n.º 3
0
 /**
  * Called when the form data is valid.
  * Handle, transform and return the data in an array format so it can
  * be json encoded and sent back to the client.
  *
  * @param array $data
  * @return array
  */
 public function process(array $data)
 {
     $data = parent::process($data);
     $data['meta']['description'] = Hash::get($data, 'data.content');
     return $data;
 }