You are here

function node_admin_menu_map in Administration menu 8.3

Same name and namespace in other branches
  1. 7.3 admin_menu.map.inc \node_admin_menu_map()

Implements hook_admin_menu_map() on behalf of Node module.

@todo admin_menu_admin_menu_output_build() needs to expand the partial tree it creates, so that this definition takes effect.

File

./admin_menu.map.inc, line 14
Implements hook_admin_menu_map() on behalf of core modules.

Code

function node_admin_menu_map() {
  if (user_access('administer content types')) {
    $map['admin/structure/types/manage/%node_type'] = [
      'parent' => 'admin/structure/types',
      'arguments' => [
        [
          '%node_type' => array_keys(node_type_get_types()),
        ],
      ],
    ];
  }
  $map['node/add/%node_type'] = [
    'parent' => 'node/add',
    'arguments' => [
      [
        '%node_type' => array_keys(node_type_get_types()),
      ],
    ],
  ];
  return $map;
}