You are here

function onlyone_admin_toolbar_node_update in Allow a content type only once (Only One) 8

Implements hook_entity_update().

File

modules/onlyone_admin_toolbar/onlyone_admin_toolbar.module, line 99
Contains onlyone_admin_toolbar.module.

Code

function onlyone_admin_toolbar_node_update(EntityInterface $node) {

  // Rebuild the menu if needed.

  /** @var \Drupal\node\NodeInterface $node */
  \Drupal::service('onlyone.admin_toolbar')
    ->rebuildMenu($node
    ->getType());
}