WebformTermSelect.php in Webform 6.x
File
src/Element/WebformTermSelect.php
View source
<?php
namespace Drupal\webform\Element;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element\Select;
class WebformTermSelect extends Select {
use WebformTermReferenceTrait;
public function getInfo() {
return [
'#vocabulary' => '',
'#tree_delimiter' => '-',
'#breadcrumb' => FALSE,
'#breadcrumb_delimiter' => ' › ',
'#depth' => NULL,
] + parent::getInfo();
}
public static function processSelect(&$element, FormStateInterface $form_state, &$complete_form) {
static::setOptions($element);
$element = parent::processSelect($element, $form_state, $complete_form);
$element['#type'] = 'select';
return $element;
}
}