
| Current Path : /var/www/html/c12park/web/modules/contrib/webform/src/Plugin/WebformElement/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/c12park/web/modules/contrib/webform/src/Plugin/WebformElement/TableSelect.php |
<?php
namespace Drupal\webform\Plugin\WebformElement;
/**
* Provides a 'tableselect' element.
*
* @WebformElement(
* id = "tableselect",
* api = "https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!Element!Tableselect.php/class/Tableselect",
* label = @Translation("Table select"),
* description = @Translation("Provides a form element for a table with radios or checkboxes in left column."),
* category = @Translation("Options elements"),
* )
*/
class TableSelect extends OptionsBase {
use WebformTableTrait;
/**
* {@inheritdoc}
*/
protected function defineDefaultProperties() {
return [
// Options settings.
'multiple' => TRUE,
'multiple_error' => '',
// Table settings.
'js_select' => TRUE,
] + parent::defineDefaultProperties();
}
/* ************************************************************************ */
/**
* {@inheritdoc}
*/
public function supportsMultipleValues() {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function getElementSelectorOptions(array $element) {
return $this->getTableSelectElementSelectorOptions($element);
}
}