public function getConfig(&$config) { if ($this->isSelected()) { $config['selected'] = true; } return parent::getConfig($config); }
public function getConfig(&$config) { if ($this->selected) { $config['selected'] = $this->selected; } return parent::getConfig($config); }
public function getConfig(&$config) { $o = []; foreach ($this->fields as $field) { $label = $field->getLabel(); $data = $field->getField()->getValue(); $o[] = ['data' => $data, 'label' => $label]; } $config['options'] = $o; return parent::getConfig($config); }
public function getConfig(&$config) { if ($this->useInputTag) { $config['useInputTag'] = true; } $config['type'] = $this->input->getAttribute('type'); return parent::getConfig($config); }
public function getConfig(&$config) { if ($this->isMultiline()) { $config['multiline'] = true; } else { $type = $this->input->getAttribute('type'); if ($type !== 'text') { $config['type'] = $type; } } if ($this->isReadOnly()) { $config['readOnly'] = true; } $placeholder = $this->input->getAttribute('placeholder'); if ($placeholder !== null) { $config['placeholder'] = $placeholder; } $maxlength = $this->input->getAttribute('maxlength'); if ($maxlength !== null) { $config['maxLength'] = $maxlength; } $autofocus = $this->input->getAttribute('autofocus'); if ($autofocus !== null) { $config['autofocus'] = true; } $required = $this->input->getAttribute('required'); $ariarequired = $this->input->getAttribute('aria-required'); if ($required !== null || $ariarequired !== null) { $config['required'] = true; } return parent::getConfig($config); }
public function getConfig(&$config) { $o = []; foreach ($this->options as $option) { $label = $option->content[0]; $data = $option->getAttribute('value'); $o[] = ['data' => $data, 'label' => $label]; } $config['options'] = $o; return parent::getConfig($config); }