function _homebox_get_view_name in Homebox 6
Same name and namespace in other branches
- 6.3 homebox.module \_homebox_get_view_name()
- 6.2 homebox.module \_homebox_get_view_name()
- 7.3 homebox.module \_homebox_get_view_name()
- 7.2 homebox.module \_homebox_get_view_name()
1 call to _homebox_get_view_name()
- homebox_load_blocks_in_regions in ./
homebox.module - Loads available blocks for user
File
- ./
homebox.module, line 498 - Home box main file, takes care of global functions settings constants, etc.
Code
function _homebox_get_view_name($block) {
$delta = $block->delta;
// if this is 32, this should be an md5 hash.
if (drupal_strlen($delta) == 32) {
$hashes = variable_get('views_block_hashes', array());
if (!empty($hashes[$delta])) {
$delta = $hashes[$delta];
}
}
// This indicates it's a special one.
if (drupal_substr($delta, 0, 1) == '-') {
list($nothing, $type, $name, $display_id) = explode('-', $delta);
if ($view = views_get_view($name)) {
$name = $view->display[$display_id]->display_options['block_description'];
$view
->destroy();
}
}
list($name, $display_id) = explode('-', $delta);
// Load the view
if ($view = views_get_view($name)) {
$name = $view->display[$display_id]->display_options['block_description'];
$view
->destroy();
}
return $name;
}