function panels_print_layout_link in Panels 7.3
Same name and namespace in other branches
- 8.3 panels.module \panels_print_layout_link()
- 5.2 panels.module \panels_print_layout_link()
- 6.3 panels.module \panels_print_layout_link()
- 6.2 panels.module \panels_print_layout_link()
Print the layout link. Sends out to a theme function.
@layout
1 call to panels_print_layout_link()
- panels_common_print_layout_links in includes/
common.inc - Print a selector of layouts, each linked to the next step.
File
- ./
panels.module, line 1396 - Core functionality for the Panels engine.
Code
function panels_print_layout_link($id, $layout, $link, $options = array(), $current_layout = FALSE) {
if (isset($options['query']['q'])) {
unset($options['query']['q']);
}
// Setup classes for layout link, including current-layout information.
$class = array(
'layout-link',
);
if ($current_layout == $id) {
$options['attributes']['class'][] = 'current-layout-link';
$class[] = 'current-layout';
}
ctools_add_css('panels_admin', 'panels');
$file = $layout['path'] . '/' . $layout['icon'];
$image = theme('image', array(
'path' => $file,
));
return theme('panels_layout_link', array(
'title' => $layout['title'],
'image' => $image,
'link' => $link,
'class' => $class,
'options' => $options,
));
}