protected function ShsTermSelect::getTermStorage in Webform Simple Hierarchical Select 8
Get the term storage service.
Return value
\Drupal\taxonomy\TermStorageInterface Taxonomy term storage.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
File
- src/
Plugin/ WebformElement/ ShsTermSelect.php, line 215
Class
- ShsTermSelect
- Provides a 'webform_shs_term_select' Webform element.
Namespace
Drupal\webform_shs\Plugin\WebformElementCode
protected function getTermStorage() {
if ($this->termStorage === NULL) {
// Don't attempt to follow constructor changes in webform. Changes cross
// versions make it impossible to support multiple versions with
// constructor injection.
$this->termStorage = \Drupal::entityTypeManager()
->getStorage('taxonomy_term');
}
return $this->termStorage;
}