taxonomy_menu.module in Taxonomy menu 8.3
Same filename and directory in other branches
Contains taxonomy_menu.module.
File
taxonomy_menu.moduleView source
<?php
/**
* @file
* Contains taxonomy_menu.module.
*/
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_menu_help().
*/
function taxonomy_menu_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.taxonomy_menu':
return t('<p>The Taxonomy Menu module transforms your taxonomy vocabularies into menus.</p>
<p>See the <a href=":project_page">project page on Drupal.org</a> for more details.</p>', [
':project_page' => 'https://www.drupal.org/project/taxonomy_menu',
]);
}
}
/**
* Implements hook_entity_insert().
*
* Check for taxonomy term insert.
*/
function taxonomy_menu_taxonomy_term_insert(EntityInterface $entity) {
\Drupal::service('taxonomy_menu.helper')
->generateTaxonomyMenuEntries($entity, FALSE);
}
/**
* Implements hook_entity_delete().
*
* Check for taxonomy term deletion.
*/
function taxonomy_menu_taxonomy_term_delete(EntityInterface $entity) {
\Drupal::service('taxonomy_menu.helper')
->removeTaxonomyMenuEntries($entity, FALSE);
}
/**
* Implements hook_entity_update().
*
* Check for taxonomy term updates.
*/
function taxonomy_menu_taxonomy_term_update(EntityInterface $entity) {
\Drupal::service('taxonomy_menu.helper')
->updateTaxonomyMenuEntries($entity, FALSE);
}
Functions
Name | Description |
---|---|
taxonomy_menu_help | Implements hook_menu_help(). |
taxonomy_menu_taxonomy_term_delete | Implements hook_entity_delete(). |
taxonomy_menu_taxonomy_term_insert | Implements hook_entity_insert(). |
taxonomy_menu_taxonomy_term_update | Implements hook_entity_update(). |