1 layout.admin.inc _layout_get_group_operations($path, array $group)

Given a path, return a list of operations for a group of layouts.

File

core/modules/layout/layout.admin.inc, line 163
Administrative functions for Layout module.

Code

function _layout_get_group_operations($path, array $group) {
  $links = array();

  // The default layouts have no operations.
  if ($path === '') {
    return $links;
  }

  $last_layout = end($group);
  reset($group);
  if ($last_layout->menu_item) {
    $links['menu_settings'] = array(
      'title' => t('Menu settings'),
      'href' => 'admin/structure/layouts/menu/' . $last_layout->menu_item->name,
    );
  }
  if (count($group) > 1) {
    $links['reorder'] = array(
      'title' => t('Reorder'),
      'href' => 'admin/structure/layouts/reorder',
      'query' => array('layouts' => array_keys($group)),
    );
  }
  return $links;
}