function panels_mini_get_id in Panels 6.2
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()
- 7.3 panels_mini/panels_mini.module \panels_mini_get_id()
Statically store all used IDs to ensure all mini panels get a unique id.
3 calls to panels_mini_get_id()
- panels_mini_block in panels_mini/
panels_mini.module - Implementation of hook_block().
- panels_mini_content in panels_mini/
panels_mini.module - Render a mini panel called from a panels display.
- panels_mini_preview_panel in panels_mini/
panels_mini.admin.inc - Provide an administrative preview of a mini panel.
File
- panels_mini/
panels_mini.module, line 110 - panels_mini.module
Code
function panels_mini_get_id($name) {
static $id_cache = array();
$id = 'mini-panel-' . $name;
if (!empty($id_cache[$name])) {
$id .= "-" . $id_cache[$name]++;
}
else {
$id_cache[$name] = 1;
}
return $id;
}