You are here

webform_shs.module in Webform Simple Hierarchical Select 8

Same filename and directory in other branches
  1. 7 webform_shs.module

Webform component which renders a "shs" field.

File

webform_shs.module
View source
<?php

/**
 * @file
 * Webform component which renders a "shs" field.
 */
use Drupal\taxonomy\TermInterface;
use Drupal\webform_shs\Element\ShsTermSelect;

/**
 * Implements hook_ENTITY_TYPE_presave().
 */
function webform_shs_taxonomy_term_presave(TermInterface $term) {
  ShsTermSelect::invalidateOptionsCache($term
    ->bundle());
}

/**
 * Implements hook_ENTITY_TYPE_delete().
 */
function webform_shs_taxonomy_term_delete(TermInterface $term) {
  ShsTermSelect::invalidateOptionsCache($term
    ->bundle());
}