You are here

public function CshsWidget::getVocabulary in Client-side Hierarchical Select 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldWidget/CshsWidget.php \Drupal\cshs\Plugin\Field\FieldWidget\CshsWidget::getVocabulary()

Returns the taxonomy vocabulary to work with.

Return value

\Drupal\taxonomy\VocabularyInterface|null The taxonomy vocabulary.

Overrides CshsOptionsFromHelper::getVocabulary

File

src/Plugin/Field/FieldWidget/CshsWidget.php, line 162

Class

CshsWidget
Provides "cshs" field widget.

Namespace

Drupal\cshs\Plugin\Field\FieldWidget

Code

public function getVocabulary() : VocabularyInterface {
  return $this
    ->getVocabularyStorage()
    ->load(\reset($this->fieldDefinition
    ->getSettings()['handler_settings']['target_bundles']));
}