function views_block_views_default_views in Views Hacks 6
Same name and namespace in other branches
- 7 views_block/views_block.views_default.inc \views_block_views_default_views()
Implementation of hook_views_default_views().
File
- views_block/
views_block.views_default.inc, line 6
Code
function views_block_views_default_views() {
$view = new view();
$view->name = 'blocks';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'blocks';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE;
/* Edit this to true to make a default view disabled initially */
$handler = $view
->new_display('default', 'Defaults', 'default');
$handler
->override_option('fields', array(
'info' => array(
'label' => 'Description',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'info',
'table' => 'boxes',
'field' => 'info',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'edit_block' => array(
'label' => 'Edit link',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'edit_block',
'table' => 'blocks',
'field' => 'edit_block',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'status' => array(
'id' => 'status',
'table' => 'blocks',
'field' => 'status',
),
'title' => array(
'id' => 'title',
'table' => 'blocks',
'field' => 'title',
),
'body' => array(
'label' => 'Body',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'body',
'table' => 'boxes',
'field' => 'body',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'format' => array(
'label' => 'Format',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'format',
'table' => 'boxes',
'field' => 'format',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'module' => array(
'id' => 'module',
'table' => 'blocks',
'field' => 'module',
),
'delta' => array(
'id' => 'delta',
'table' => 'blocks',
'field' => 'delta',
),
'custom' => array(
'id' => 'custom',
'table' => 'blocks',
'field' => 'custom',
),
'visibility' => array(
'label' => 'Page visibility',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'visibility',
'table' => 'blocks',
'field' => 'visibility',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'pages' => array(
'id' => 'pages',
'table' => 'blocks',
'field' => 'pages',
),
'theme' => array(
'id' => 'theme',
'table' => 'blocks',
'field' => 'theme',
),
'region' => array(
'label' => 'Region',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'region',
'table' => 'blocks',
'field' => 'region',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'weight' => array(
'id' => 'weight',
'table' => 'blocks',
'field' => 'weight',
),
'cache' => array(
'label' => 'Cache',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 0,
'id' => 'cache',
'table' => 'blocks',
'field' => 'cache',
'relationship' => 'none',
),
'throttle' => array(
'id' => 'throttle',
'table' => 'blocks',
'field' => 'throttle',
),
));
$handler
->override_option('filters', array(
'info' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'info_op',
'identifier' => 'info',
'label' => 'Description',
'optional' => 1,
'remember' => 0,
),
'case' => 1,
'id' => 'info',
'table' => 'boxes',
'field' => 'info',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'status' => array(
'operator' => '=',
'value' => 'All',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'operator' => '',
'identifier' => 'status',
'label' => 'Active',
'optional' => 1,
'remember' => 0,
),
'id' => 'status',
'table' => 'blocks',
'field' => 'status',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'title' => array(
'operator' => 'contains',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'title_op',
'identifier' => 'title',
'label' => 'Title',
'optional' => 1,
'remember' => 0,
),
'case' => 0,
'id' => 'title',
'table' => 'blocks',
'field' => 'title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'body' => array(
'operator' => 'REGEXP',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'body_op',
'identifier' => 'body',
'label' => 'Body',
'optional' => 1,
'remember' => 0,
),
'id' => 'body',
'table' => 'boxes',
'field' => 'body',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'format' => array(
'operator' => 'in',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'format_op',
'identifier' => 'format',
'label' => 'Body format',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'format',
'table' => 'boxes',
'field' => 'format',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'module' => array(
'operator' => 'in',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'module_op',
'identifier' => 'module',
'label' => 'Module',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'module',
'table' => 'blocks',
'field' => 'module',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'delta' => array(
'operator' => 'contains',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'delta_op',
'identifier' => 'delta',
'label' => 'Delta',
'optional' => 1,
'remember' => 0,
),
'case' => 0,
'id' => 'delta',
'table' => 'blocks',
'field' => 'delta',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'custom' => array(
'operator' => 'in',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'custom_op',
'identifier' => 'custom',
'label' => 'Custom visibility',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'custom',
'table' => 'blocks',
'field' => 'custom',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'visibility' => array(
'operator' => 'in',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'visibility_op',
'identifier' => 'visibility',
'label' => 'Page visibility',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'visibility',
'table' => 'blocks',
'field' => 'visibility',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'pages' => array(
'operator' => 'REGEXP',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'pages_op',
'identifier' => 'pages',
'label' => 'Pages',
'optional' => 1,
'remember' => 0,
),
'id' => 'pages',
'table' => 'blocks',
'field' => 'pages',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'theme' => array(
'operator' => 'in',
'value' => array(
'***CURRENT_THEME***' => '***CURRENT_THEME***',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'theme_op',
'identifier' => 'theme',
'label' => 'Theme',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'theme',
'table' => 'blocks',
'field' => 'theme',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'region' => array(
'operator' => 'in',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'region_op',
'identifier' => 'region',
'label' => 'Region',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'id' => 'region',
'table' => 'blocks',
'field' => 'region',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'cache' => array(
'operator' => '=',
'value' => array(
'-1' => 0,
'1' => 0,
'2' => 0,
'4' => 0,
'8' => 0,
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'operator' => '',
'identifier' => 'cache',
'label' => 'Cache',
'optional' => 1,
'remember' => 0,
),
'id' => 'cache',
'table' => 'blocks',
'field' => 'cache',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'throttle' => array(
'operator' => '=',
'value' => 'All',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'operator' => '',
'identifier' => 'throttle',
'label' => 'Throttle',
'optional' => 1,
'remember' => 0,
),
'id' => 'throttle',
'table' => 'blocks',
'field' => 'throttle',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'bid' => array(
'operator' => '=',
'value' => array(
'value' => '',
'min' => '',
'max' => '',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'bid_op',
'identifier' => 'bid',
'label' => 'Block ID',
'optional' => 1,
'remember' => 0,
),
'id' => 'bid',
'table' => 'blocks',
'field' => 'bid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler
->override_option('access', array(
'type' => 'none',
));
$handler
->override_option('cache', array(
'type' => 'none',
));
$handler
->override_option('items_per_page', 0);
$handler
->override_option('style_plugin', 'bulk');
$handler
->override_option('style_options', array(
'grouping' => 'region',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'info' => 'info',
'edit_block' => 'edit_block',
'status' => 'status',
'title' => 'title',
'body' => 'body',
'format' => 'format',
'module' => 'module',
'delta' => 'delta',
'custom' => 'custom',
'visibility' => 'visibility',
'pages' => 'pages',
'theme' => 'theme',
'region' => 'region',
'weight' => 'weight',
'cache' => 'cache',
'throttle' => 'throttle',
),
'info' => array(
'info' => array(
'separator' => '',
),
'edit_block' => array(
'separator' => '',
),
'status' => array(
'sortable' => 1,
'separator' => '',
),
'title' => array(
'sortable' => 1,
'separator' => '',
),
'body' => array(
'separator' => '',
),
'format' => array(
'separator' => '',
),
'module' => array(
'sortable' => 1,
'separator' => '',
),
'delta' => array(
'sortable' => 1,
'separator' => '',
),
'custom' => array(
'separator' => '',
),
'visibility' => array(
'separator' => '',
),
'pages' => array(
'separator' => '',
),
'theme' => array(
'sortable' => 1,
'separator' => '',
),
'region' => array(
'sortable' => 1,
'separator' => '',
),
'weight' => array(
'sortable' => 1,
'separator' => '',
),
'cache' => array(
'sortable' => 1,
'separator' => '',
),
'throttle' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => 'weight',
'execution_type' => '1',
'display_type' => '0',
'hide_select_all' => 0,
'skip_confirmation' => 0,
'display_result' => 1,
'merge_single_action' => 1,
'selected_operations' => array(
'views_bulk_operations_script_action' => 'views_bulk_operations_script_action',
),
));
$handler = $view
->new_display('page', 'Page', 'page_1');
$handler
->override_option('path', 'admin/build/blocks2');
$views[$view->name] = $view;
return $views;
}