public function getInput()
 {
     if (!is_array($this->value)) {
         $this->value = $this->value ? array($this->value) : array();
     }
     return '<div data-widget="extrafieldgroups" data-value="' . implode('|', $this->value) . '">' . K2HelperHTML::extraFieldsGroups($this->name, null, ' ', array('data-role' => 'extra-field-groups-selector'), 'item') . '<div data-role="list"></div></div>';
 }
Exemplo n.º 2
0
 protected function setFormFields(&$form, $row)
 {
     $form->state = K2HelperHTML::state('state', $row->state, false, false, 'radio', true);
     $form->group = K2HelperHTML::extraFieldsGroups('group', $row->group);
     $form->type = K2HelperHTML::extraFieldsTypes('type', $row->type, 'K2_SELECT_TYPE');
     $definitions = K2HelperExtraFields::getDefinitions();
     if ($row->id) {
         $definitions[$row->type] = $row->getDefinition();
     }
     $form->definitions = $definitions;
 }