You are here

function views_content_get_pane_links_alter in Chaos Tool Suite (ctools) 7

Implements hook_get_pane_links_alter().

File

views_content/views_content.module, line 288
Provides views as panels content, configurable by the administrator. Each view provided as panel content must be configured in advance, but once configured, building panels with views is a little bit simpler.

Code

function views_content_get_pane_links_alter(&$links, $pane, $content_type) {
  if ($pane->type === 'views_panes') {
    list($view_name, $display_name) = explode('-', $pane->subtype);
    $destination = array(
      'destination' => current_path(),
    );
    $links['top'][] = array(
      'title' => t('Edit view'),
      'href' => url('admin/structure/views/view/' . $view_name . '/edit/' . $display_name, array(
        'query' => $destination,
        'absolute' => TRUE,
      )),
    );
  }
}