function system_get_module_admin_tasks

cis7 system.module system_get_module_admin_tasks($module, $info)
cle7 system.module system_get_module_admin_tasks($module, $info)
elmsmedia7 system.module system_get_module_admin_tasks($module, $info)
icor7 system.module system_get_module_admin_tasks($module, $info)
meedjum_blog7 system.module system_get_module_admin_tasks($module, $info)
mooc7 system.module system_get_module_admin_tasks($module, $info)

Generate a list of tasks offered by a specified module.


$module: Module name.

$info: The module's information, as provided by system_get_info().

Return value

An array of task links.

2 calls to system_get_module_admin_tasks()
help_page in modules/help/
Menu callback; prints a page listing general help for a module.
system_admin_index in modules/system/
Menu callback; prints a listing of admin tasks, organized by module.


modules/system/system.module, line 2930
Configuration system that lets administrators modify the workings of the site.


function system_get_module_admin_tasks($module, $info) {
  $links = &drupal_static(__FUNCTION__);

  if (!isset($links)) {
    $links = array();
    $query = db_select('menu_links', 'ml', array('fetch' => PDO::FETCH_ASSOC));
    $query->join('menu_router', 'm', 'm.path = ml.router_path');
    // Weight should be taken from {menu_links}, not {menu_router}.
    ->fields('m', array_diff(drupal_schema_fields_sql('menu_router'), array('weight')))->condition('ml.link_path', 'admin/%', 'LIKE')->condition('ml.hidden', 0, '>=')->condition('ml.module', 'system')->condition('m.number_parts', 1, '>')->condition('m.page_callback', 'system_admin_menu_block_page', '<>');
    foreach ($query->execute() as $link) {
      if ($link['access']) {
        $links[$link['router_path']] = $link;

  $admin_tasks = array();
  $titles = array();
  if ($menu = module_invoke($module, 'menu')) {
    foreach ($menu as $path => $item) {
      if (isset($links[$path])) {
        $task = $links[$path];
        // The link description, either derived from 'description' in
        // hook_menu() or customized via menu module is used as title attribute.
        if (!empty($task['localized_options']['attributes']['title'])) {
          $task['description'] = $task['localized_options']['attributes']['title'];

        // Check the admin tasks for duplicate names. If one is found,
        // append the parent menu item's title to differentiate.
        $duplicate_path = array_search($task['title'], $titles);
        if ($duplicate_path !== FALSE) {
          if ($parent = menu_link_load($task['plid'])) {
            // Append the parent item's title to this task's title.
            $task['title'] = t('@original_title (@parent_title)', array('@original_title' => $task['title'], '@parent_title' => $parent['title']));
          if ($parent = menu_link_load($admin_tasks[$duplicate_path]['plid'])) {
            // Append the parent item's title to the duplicated task's title.
            // We use $links[$duplicate_path] in case there are triplicates.
            $admin_tasks[$duplicate_path]['title'] = t('@original_title (@parent_title)', array('@original_title' => $links[$duplicate_path]['title'], '@parent_title' => $parent['title']));
        else {
          $titles[$path] = $task['title'];

        $admin_tasks[$path] = $task;

  // Append link for permissions.
  if (module_hook($module, 'permission')) {
    $item = menu_get_item('admin/people/permissions');
    if (!empty($item['access'])) {
      $item['link_path'] = $item['href'];
      $item['title'] = t('Configure @module permissions', array('@module' => $info['name']));
      $item['localized_options']['fragment'] = 'module-' . $module;
      $admin_tasks["admin/people/permissions#module-$module"] = $item;

  return $admin_tasks;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.