You are here

function panels_breadcrumbs_page_manager_variant_operations_alter in Panels Breadcrumbs 7

Same name and namespace in other branches
  1. 8 panels_breadcrumbs.module \panels_breadcrumbs_page_manager_variant_operations_alter()
  2. 7.2 panels_breadcrumbs.module \panels_breadcrumbs_page_manager_variant_operations_alter()

Implements hook_page_manager_variant_operations_alter().

Shameful rip off from panels_everywhere module.

See also

panels_everywhere_page_manager_variant_operations_alter()

http://groups.drupal.org/node/110719#comment-356094

File

./panels_breadcrumbs.module, line 16
Main file for panels breadcrumbs module.

Code

function panels_breadcrumbs_page_manager_variant_operations_alter(&$operations, $handler) {

  // Use this obnoxious construct to safely insert our item.
  reset($operations['children']);
  $children_operations = array();
  while (list($key, $value) = each($operations['children'])) {
    $children_operations[$key] = $value;
    if ($key == 'context') {
      $children_operations['breadcrumb'] = array(
        'title' => t('Breadcrumb'),
        'description' => t('Edit Breadcrumbs.'),
        'form' => 'panels_breadcrumbs_variant_breadcrumb_form',
      );
    }
  }
  $operations['children'] = $children_operations;
}