1 views_plugin_display_block.inc | views_plugin_display_block::execute_hook_block_list($delta = 0, $edit = array()) |
Return a list of blocks provided by this display plugin.
File
- core/
modules/ views/ plugins/ views_plugin_display_block.inc, line 81 - Contains the block display plugin.
Class
- views_plugin_display_block
- The plugin that handles a block.
Code
function execute_hook_block_list($delta = 0, $edit = array()) {
$delta = $this->view->name . '-' . $this->display->id;
if (!empty($this->get_option('block_description'))) {
$info = $this->get_option('block_description');
}
else {
$info = t('View: @view (@display)', array('@view' => t($this->view->get_human_name()), '@display' => t($this->display->display_title)));
}
$required_contexts = array();
if (!empty($this->display->display_options['argument_input'])) {
foreach ($this->display->display_options['argument_input'] as $key => $value) {
if ($value['type'] == 'layout') {
$required_contexts[$key] = $value['layout'];
}
}
}
return array(
$delta => array(
'info' => $info,
'description' => $this->view->description ? check_plain(t($this->view->description)) : t('Block display from the "@view" view.', array('@view' => t($this->view->get_human_name()))),
'cache' => $this->get_cache_type(),
'class' => 'ViewsBlock',
'required contexts' => $required_contexts,
),
);
}