function panels_renderer_editor::get_region_links in Panels 7.3
Same name and namespace in other branches
- 6.3 plugins/display_renderers/panels_renderer_editor.class.php \panels_renderer_editor::get_region_links()
Render the links to display when editing a region.
2 calls to panels_renderer_editor::get_region_links()
- panels_renderer_editor::command_update_region_links in plugins/
display_renderers/ panels_renderer_editor.class.php - Create a command to update the links on a region after a change was made.
- panels_renderer_editor::render_region in plugins/
display_renderers/ panels_renderer_editor.class.php - Render a single panel region.
File
- plugins/
display_renderers/ panels_renderer_editor.class.php, line 270 - Class file to control the main Panels editor.
Class
- panels_renderer_editor
- @file Class file to control the main Panels editor.
Code
function get_region_links($region_id) {
if (!empty($this->no_edit_links)) {
return '';
}
$links = array();
$links[] = array(
'title' => t('Add content'),
'href' => $this
->get_url('select-content', $region_id),
'attributes' => array(
'class' => array(
'ctools-use-modal',
),
),
);
if (user_access('administer panels region styles')) {
$links[] = array(
'title' => '<hr />',
'html' => TRUE,
);
$style_links = $this
->get_style_links('region', $region_id);
$links[] = array(
'title' => '<span class="dropdown-header">' . t('Style') . '</span>' . theme_links(array(
'links' => $style_links,
'attributes' => array(),
'heading' => array(),
)),
'html' => TRUE,
'attributes' => array(
'class' => array(
'panels-sub-menu',
),
),
);
}
return theme('ctools_dropdown', array(
'title' => theme('image', array(
'path' => ctools_image_path('icon-addcontent.png', 'panels'),
)),
'links' => $links,
'image' => TRUE,
'class' => 'pane-add-link panels-region-links-' . $region_id,
));
}