You are here

function colorapi_menu_links_discovered_alter in Color API 8

Implements hook_menu_links_discovered_alter().

File

./colorapi.module, line 47
Holds hooks for the Color API module.

Code

function colorapi_menu_links_discovered_alter(&$links) {

  // If the Color entity is disabled, items from the config page.
  $color_entity_enabled = \Drupal::config('colorapi.settings')
    ->get('enable_color_entity');
  if (!$color_entity_enabled) {
    unset($links['entity.coloreapi_color.collection']);
  }
}