function ctools_views_config_schema_info_alter
Same name in other branches
- 4.0.x modules/ctools_views/ctools_views.module \ctools_views_config_schema_info_alter()
Implements hook_config_schema_info_alter().
File
-
modules/
ctools_views/ ctools_views.module, line 23
Code
function ctools_views_config_schema_info_alter(&$definitions) {
// Add to the views block plugin schema.
$definitions['views_block']['mapping']['pager'] = [
'type' => 'string',
'label' => 'Pager type',
];
$definitions['views_block']['mapping']['fields'] = [
'type' => 'sequence',
'label' => 'Fields settings',
'sequence' => [
[
'type' => 'mapping',
'label' => 'Field settings',
'mapping' => [
'hide' => [
'type' => 'boolean',
'label' => 'Hide field',
],
'weight' => [
'type' => 'integer',
'label' => 'Field weight',
],
],
],
],
];
$definitions['views_block']['mapping']['filter'] = [
'type' => 'sequence',
'label' => 'Filters settings',
'sequence' => [
[
'type' => 'mapping',
'label' => 'Filter settings',
'mapping' => [
'type' => [
'type' => 'string',
'label' => 'Plugin id',
],
'disable' => [
'type' => 'boolean',
'label' => 'Disable filter',
],
],
],
],
];
$definitions['views_block']['mapping']['exposed'] = [
'type' => 'sequence',
'label' => 'Exposed filter values',
'sequence' => [
'type' => 'views.filter.[plugin_id]',
],
];
$definitions['views_block']['mapping']['sort'] = [
'type' => 'sequence',
'label' => 'Sort settings',
'sequence' => [
[
'type' => 'string',
'label' => 'Sort order value',
],
],
];
$definitions['views_block']['mapping']['pager_offset'] = [
'type' => 'integer',
'label' => 'Pager offset',
];
// Add to the views block display plugin schema.
$definitions['views.display.block']['mapping']['allow']['mapping']['offset'] = [
'type' => 'string',
'label' => 'Pager offset',
];
$definitions['views.display.block']['mapping']['allow']['mapping']['pager'] = [
'type' => 'string',
'label' => 'Pager type',
];
$definitions['views.display.block']['mapping']['allow']['mapping']['hide_fields'] = [
'type' => 'string',
'label' => 'Hide fields',
];
$definitions['views.display.block']['mapping']['allow']['mapping']['sort_fields'] = [
'type' => 'string',
'label' => 'Sort fields',
];
$definitions['views.display.block']['mapping']['allow']['mapping']['configure_filters'] = [
'type' => 'string',
'label' => 'Configure filters',
];
$definitions['views.display.block']['mapping']['allow']['mapping']['disable_filters'] = [
'type' => 'string',
'label' => 'Disable filters',
];
$definitions['views.display.block']['mapping']['allow']['mapping']['configure_sorts'] = [
'type' => 'string',
'label' => 'Configure sorts',
];
}