YamlFormTableSort.php in YAML Form 8
Same filename in this branch
Namespace
Drupal\yamlform\Plugin\YamlFormElementFile
src/Plugin/YamlFormElement/YamlFormTableSort.phpView source
<?php
namespace Drupal\yamlform\Plugin\YamlFormElement;
/**
* Provides a 'yamlform_table_sort' element.
*
* @YamlFormElement(
* id = "yamlform_table_sort",
* label = @Translation("Table sort"),
* category = @Translation("Options elements"),
* multiple = TRUE,
* states_wrapper = TRUE,
* )
*/
class YamlFormTableSort extends OptionsBase {
use YamlFormTableTrait;
/**
* {@inheritdoc}
*/
protected $exportDelta = TRUE;
/**
* {@inheritdoc}
*/
public function getDefaultProperties() {
$properties = parent::getDefaultProperties();
unset($properties['options_randomize']);
return $properties;
}
/**
* {@inheritdoc}
*/
public function hasMultipleValues(array $element) {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function getDefaultFormat() {
return 'ol';
}
/**
* {@inheritdoc}
*/
public function getElementSelectorOptions(array $element) {
return [];
}
}
Classes
Name | Description |
---|---|
YamlFormTableSort | Provides a 'yamlform_table_sort' element. |