signalpoint / DrupalGap

An application development kit for Drupal websites.
https://www.drupalgap.org
GNU General Public License v2.0
232 stars 185 forks source link

Allow a route to be deleted #998

Closed signalpoint closed 6 years ago

signalpoint commented 6 years ago

Often times a developer will want their own user login form and will want to get rid of the default route, or get rid of any default route for that matter. With this new function, it'll be possible.

/**
 * Implements hook_init()
 */
function my_module_init() {

  // Remove the user login route provided by DrupalGap 8 core.
  dg.router.deleteRoute('user.login');

}