function panels_renderer_editor::get_display_links in Panels 6.3
Same name and namespace in other branches
- 7.3 plugins/display_renderers/panels_renderer_editor.class.php \panels_renderer_editor::get_display_links()
Get the links for a panel display.
This is abstracted out for easy ajax replacement.
1 call to panels_renderer_editor::get_display_links()
- panels_renderer_editor::command_update_display_links in plugins/
display_renderers/ panels_renderer_editor.class.php - Create a command to update the links on a display after a change was made.
File
- plugins/
display_renderers/ panels_renderer_editor.class.php, line 204 - Class file to control the main Panels editor.
Class
- panels_renderer_editor
- @file Class file to control the main Panels editor.
Code
function get_display_links() {
$links = array();
if (user_access('administer panels styles')) {
$style_links = $this
->get_style_links('display');
$links[] = array(
'title' => '<span class="dropdown-header">' . t('Style') . '</span>' . theme_links($style_links),
'html' => TRUE,
'attributes' => array(
'class' => 'panels-sub-menu',
),
);
}
if (user_access('use panels caching features')) {
$links[] = array(
'title' => '<hr />',
'html' => TRUE,
);
$method = isset($this->display->cache['method']) ? $this->display->cache['method'] : 0;
$info = panels_get_cache($method);
$cache_method = isset($info['title']) ? $info['title'] : t('No caching');
$cache_links[] = array(
'title' => $cache_method,
'attributes' => array(
'class' => 'panels-text',
),
);
$cache_links[] = array(
'title' => t('Change'),
'href' => $this
->get_url('cache-method', 'display'),
'attributes' => array(
'class' => 'ctools-use-modal',
),
);
if (panels_plugin_get_function('cache', $info, 'settings form')) {
$cache_links[] = array(
'title' => t('Settings'),
'href' => $this
->get_url('cache-settings', 'display'),
'attributes' => array(
'class' => 'ctools-use-modal',
),
);
}
$links[] = array(
'title' => '<span class="dropdown-header">' . t('Caching') . '</span>' . theme_links($cache_links),
'html' => TRUE,
'attributes' => array(
'class' => 'panels-sub-menu',
),
);
}
return theme('ctools_dropdown', t('Display settings'), $links, FALSE, 'panels-display-links');
}