function onlyone_admin_toolbar_node_delete in Allow a content type only once (Only One) 8
Implements hook_entity_delete().
File
- modules/
onlyone_admin_toolbar/ onlyone_admin_toolbar.module, line 90 - Contains onlyone_admin_toolbar.module.
Code
function onlyone_admin_toolbar_node_delete(EntityInterface $node) {
// Rebuild the menu if needed.
/** @var \Drupal\node\NodeInterface $node */
\Drupal::service('onlyone.admin_toolbar')
->rebuildMenu($node
->getType());
}