You are here

function openlayers_content_types_get_pane_links_alter in Openlayers 7.3

Implements hook_get_pane_links_alter().

File

modules/openlayers_content_types/openlayers_content_types.module, line 19
Openlayers CTools Content Types Integration module.

Code

function openlayers_content_types_get_pane_links_alter(&$links, $pane, $content_type) {
  if ($pane->type === 'openlayers' && !empty($pane->configuration['map'])) {
    $destination = array(
      'destination' => current_path(),
    );
    $links['top'][] = array(
      'title' => t('Edit map'),
      'href' => url('admin/structure/openlayers/maps/list/' . $pane->configuration['map'] . '/edit', array(
        'query' => $destination,
        'absolute' => TRUE,
      )),
    );
  }
}