
| 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/WebformTermSelect.php |
<?php
namespace Drupal\webform\Plugin\WebformElement;
use Drupal\webform\Element\WebformTermSelect as TermSelectElement;
use Drupal\webform\Plugin\WebformElementEntityReferenceInterface;
/**
* Provides a 'webform_term_select' element.
*
* @WebformElement(
* id = "webform_term_select",
* label = @Translation("Term select"),
* description = @Translation("Provides a form element to select a single or multiple terms displayed as hierarchical tree or as breadcrumbs using a select menu."),
* category = @Translation("Entity reference elements"),
* dependencies = {
* "taxonomy",
* }
* )
*/
class WebformTermSelect extends Select implements WebformElementEntityReferenceInterface {
use WebformTermReferenceTrait;
/**
* {@inheritdoc}
*/
protected function defineDefaultProperties() {
$properties = [
'vocabulary' => '',
'breadcrumb' => FALSE,
'breadcrumb_delimiter' => ' › ',
'tree_delimiter' => '-',
'depth' => NULL,
] + parent::defineDefaultProperties();
unset(
$properties['options'],
$properties['options_randomize'],
$properties['sort_options']
);
return $properties;
}
/* ************************************************************************ */
/**
* {@inheritdoc}
*/
protected function setOptions(array &$element) {
TermSelectElement::setOptions($element);
}
}