function panels_mini_get_id in Panels 7.3
Same name and namespace in other branches
- 5.2 panels_mini/panels_mini.module \panels_mini_get_id()
- 6.3 panels_mini/panels_mini.module \panels_mini_get_id()
- 6.2 panels_mini/panels_mini.module \panels_mini_get_id()
Statically store all used IDs to ensure all mini panels get a unique id.
2 calls to panels_mini_get_id()
- panels_mini_block_view in panels_mini/
panels_mini.module - Implementation of hook_block_view().
- panels_mini_panels_mini_content_type_render in panels_mini/
plugins/ content_types/ panels_mini.inc - Render a mini panel called from a panels display.
File
- panels_mini/
panels_mini.module, line 261 - panels_mini.module
Code
function panels_mini_get_id($name) {
$id_cache =& drupal_static(__FUNCTION__, array());
$id = 'mini-panel-' . $name;
if (!empty($id_cache[$name])) {
$id .= "-" . $id_cache[$name]++;
}
else {
$id_cache[$name] = 1;
}
return $id;
}