You are here

function entityform_menu_local_tasks_alter in Entityform 7

Same name and namespace in other branches
  1. 7.2 entityform.module \entityform_menu_local_tasks_alter()

Implements hook_menu_local_tasks_alter().

File

./entityform.module, line 1028
Module for the Entityform Entity - a starting point to create your own Entity and associated administration interface

Code

function entityform_menu_local_tasks_alter(&$data, $router_item, $root_path) {

  // Add action link 'admin/structure/entityforms/add' on 'admin/structure/entityforms'.
  if ($root_path == 'admin/structure/entityforms') {
    $item = menu_get_item('admin/structure/entityforms/add');
    if ($item['access']) {
      $data['actions']['output'][] = array(
        '#theme' => 'menu_local_action',
        '#link' => $item,
      );
    }
  }
}