You are here

public function OptionsBase::getTableColumn in YAML Form 8

Get element's table column(s) settings.

Parameters

array $element: An element.

Return value

array An associative array containing an element's table column(s).

Overrides YamlFormElementBase::getTableColumn

File

src/Plugin/YamlFormElement/OptionsBase.php, line 294

Class

OptionsBase
Provides a base 'options' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function getTableColumn(array $element) {
  $key = $element['#yamlform_key'];
  $columns = parent::getTableColumn($element);
  $columns['element__' . $key]['sort'] = !$this
    ->hasMultipleValues($element);
  return $columns;
}