You are here

registration_link.module in Registration Link 8

Same filename and directory in other branches
  1. 8.2 registration_link.module

File

registration_link.module
View source
<?php

use Drupal\Core\Menu\MenuLinkTree;
use Drupal\Core\Menu\MenuLinkManager;
function registration_link_uninstall() {

  // delete the links, that this module has created
  $menuLinkManager = \Drupal::service('plugin.manager.menu.link');
  $result = $menuLinkManager
    ->loadLinksByRoute('registration_link.register', array());
  foreach ($result as $link) {

    // TODO: check for link id
    $link
      ->deleteLink();
  }
}

Functions