Commit 9a42b9f9 authored by alexpott's avatar alexpott
Browse files

Issue #1910606 by vijaycs85, mavimo, dawehner, sandipmkhairnar: Improve the...

Issue #1910606 by vijaycs85, mavimo, dawehner, sandipmkhairnar: Improve the configurations schemas for Views significantly.
parent 25813669
# Schema for the views access plugins.
views.access.none:
type: sequence
label: 'None'
sequence:
- type: string
views.access.perm:
type: mapping
label: 'Permission'
mapping:
perm:
type: string
label: 'Permission'
views.access.role:
type: sequence
label: 'Role'
sequence:
- type: string
label: 'Role'
# Schema for the views area plugins.
views.area.*:
type: views_area
label: 'Default area'
views.area.text:
type: views_area
label: 'Text'
mapping:
content:
type: text
label: 'The shown text of the area'
format:
type: string
label: 'The filter format the content is in'
tokenize:
type: boolean
label: 'Should replacement tokens be used from the first row'
views.area.text_custom:
type: views_area
label: 'Text custom'
mapping:
content:
type: text
label: 'The shown text of the area'
tokenize:
type: boolean
label: 'Should replacement tokens be used from the first row'
views.area.result:
type: views_area
label: 'Result'
mapping:
content:
type: text
label: 'The shown text of the result summary area'
views.area.title:
type: views_area
label: 'Title'
mapping:
title:
type: label
label: 'The title which will be overriden for the page'
views.area.view:
type: views_area
label: 'View'
mapping:
view_to_insert:
type: string
label: 'View to insert'
inherit_to_arguments:
type: boolean
label: 'Inherit contextual filters'
# Schema for the views argument plugins.
views.argument.*:
type: views_argument
label: 'Default argument'
views.argument.many_to_one:
type: views_argument
label: 'Many to one'
mapping:
break_phrase:
type: boolean
label: 'Allow multiple values'
add_table:
type: boolean
label: 'Allow multiple filter values to work together'
require_value:
type: boolean
label: 'Do not display items with no value in summary'
views.argument.null:
type: views_argument
label: 'Null'
mapping:
must_not_be:
type: boolean
label: 'Fail basic validation if any argument is given'
views.argument.numeric:
type: views_argument
label: 'Numeric'
mapping:
break_phrase:
type: boolean
label: 'Allow multiple values'
not:
type: boolean
label: 'Exclude'
views.argument.string:
type: views_argument
label: 'String'
mapping:
glossary:
type: boolean
label: 'Glossary mode'
limit:
type: integer
label: 'Character limit'
case:
type: string
label: 'Case'
path_case:
type: string
label: 'Case in path'
transform_dash:
type: boolean
label: 'Transform spaces to dashes in URL'
break_phrase:
type: boolean
label: 'Allow multiple values'
add_table:
type: boolean
label: 'Allow multiple filter values to work together'
require_value:
type: boolean
label: 'Do not display items with no value in summary'
# Schema for the views default arguments.
views.argument_default.fixed:
type: mapping
label: 'Fixed'
mapping:
argument:
type: string
label: 'Fixed value'
views.argument_default.php:
type: mapping
label: 'PHP Code'
mapping:
code:
type: string
label: 'PHP contextual filter code'
views.argument_default.raw:
type: mapping
label: 'Raw value from URL'
mapping:
index:
type: integer
label: 'Path component'
use_alias:
type: boolean
label: 'Use path alias'
# Schema for the views argument validators.
views.argument_validator.none:
type: sequence
label: 'Basic validation'
sequence:
- type: string
views.argument_validator.php:
type: mapping
label: 'PHP Code'
mapping:
code:
type: string
label: 'PHP validate code'
views.argument_validator.numeric:
type: boolean
label: 'Numeric'
# Schema for the views cache.
views.cache.none:
type: mapping
lable: 'None'
mapping:
type:
type: string
label: 'Cache type'
views.cache.time:
type: mapping
lable: 'None'
mapping:
type:
type: string
label: 'Time-based'
options:
type: mapping
label: 'Cache options'
mapping:
result_lifespan:
type: integer
label: 'The length of time raw query results should be cached.'
result_lifespan_custom:
type: integer
label: 'Length of time in seconds raw query results should be cached.'
output_lifespan:
type: integer
label: 'The length of time rendered HTML output should be cached.'
output_lifespan_custom:
type: integer
label: 'Length of time in seconds rendered HTML output should be cached.'
# Basic data types for views.
views_display:
type: mapping
label: 'Display options'
mapping:
title:
type: text
label: 'Display title'
format:
type: string
label: 'Format'
fields:
type: sequence
label: 'Fields'
sequence:
- type: views.field.[plugin_id]
pager:
type: mapping
label: 'Pager'
mapping:
type:
label: 'Pager type'
options:
type: views.pager.[%parent.type]
exposed_form:
type: mapping
label: 'Exposed form'
mapping:
type:
label: 'Exposed form type'
options:
label: 'Options'
type: views.exposed_form.[%parent.type]
access:
type: mapping
label: 'Access'
mapping:
type:
type: string
label: 'Access type'
options:
type: views.access.[%parent.type]
cache:
type: views.cache.[type]
label: 'Caching'
empty:
type: sequence
label: 'No results behavior'
sequence:
- type: views.area.[plugin_id]
sorts:
type: sequence
label: 'Sorts'
sequence:
- type: views.sort.[plugin_id]
arguments:
type: sequence
label: 'Arguments'
sequence:
- type: views.argument.[plugin_id]
filters:
type: sequence
label: 'Filters'
sequence:
- type: views.filter.[plugin_id]
style:
type: mapping
label: 'Format'
mapping:
type:
label: 'Type'
options:
type: views.style.[%parent.type]
row:
type: mapping
label: 'Row'
mapping:
type:
label: 'Row type'
options:
type: views.row.[%parent.type]
query:
type: mapping
label: 'Query'
mapping:
type:
type: string
label: 'Query type'
options:
type: views.query.[%parent.type]
defaults:
type: mapping
label: 'Defaults'
mapping:
access:
type: boolean
label: 'Access restrictions'
cache:
type: boolean
label: 'Caching'
query:
type: boolean
label: 'Query options'
title:
type: boolean
label: 'Title'
css_class:
type: boolean
label: 'CSS class'
display_description:
type: boolean
label: 'Administrative description'
use_ajax:
type: boolean
label: 'Use AJAX'
hide_attachment_summary:
type: boolean
label: 'Hide attachments when displaying a contextual filter summary'
show_admin_links:
type: boolean
label: 'Show contextual links'
pager:
type: boolean
label: 'Use pager'
use_more:
type: boolean
label: 'Create more link'
use_more_always:
type: boolean
label: 'Display ''more'' link only if there is more content'
use_more_text:
type: boolean
label: 'The text to display for the more link.'
exposed_form:
type: boolean
label: 'Exposed form style'
link_display:
type: boolean
label: 'Link display'
link_url:
type: boolean
label: 'Link URL'
group_by:
type: boolean
label: 'Aggregate'
style:
type: boolean
label: 'Style'
row:
type: boolean
label: 'Row'
relationships:
type: boolean
label: 'Relationships'
fields:
type: boolean
label: 'Fields'
sorts:
type: boolean
label: 'Sorts'
arguments:
type: boolean
label: 'Arguments'
filters:
type: boolean
label: 'Filters'
filter_groups:
type: boolean
label: 'Filter groups'
pager_options:
type: boolean
label: 'Pager options'
relationships:
type: sequence
label: 'Relationships'
sequence:
- type: views.relationship.[plugin_id]
views_sort:
type: mapping
label: 'Sort criteria'
mapping:
id:
type: string
label: 'ID'
table:
type: string
label: 'Table name'
field:
type: string
label: 'Field name'
relationship:
type: string
label: 'Relationship'
group_type:
type: string
label: 'Group type'
admin_label:
type: label
label: 'Administrative title'
order:
type: string
label: 'Sort order'
expose:
type: views.sort_expose.[%parent.plugin_id]
label: 'Expose settings'
exposed:
type: boolean
label: 'Expose this sort to visitors, to allow them to change it'
plugin_id:
type: string
label: 'Plugin ID'
views_area:
type: views_handler
label: 'Area'
mapping:
label:
type: label
label: 'A string to identify the area instance in the admin UI.'
empty:
type: boolean
label: 'Should the area be displayed on empty results.'
views_handler:
type: mapping
mapping:
id:
type: string
label: 'A unique ID per handler type'
table:
type: string
label: 'The views_data table for this handler'
field:
type: string
label: 'The views_data field for this handler'
relationship:
type: string
label: 'The ID of the relationship instance used by this handler'
group_type:
type: string
label: 'A sql aggregation type'
admin_label:
type: label
label: 'A string to identify the handler instance in the admin UI.'
views_argument:
type: views_handler
label: 'Argument'
mapping:
default_action:
type: string
label: 'When the filter value is NOT available'
exception:
type: mapping
label: 'Exception value'
mapping:
value:
type: string
label: 'Value'
title_enable:
type: boolean
label: 'Override title'
title:
type: label
label: 'Title'
title_enable:
type: boolean
label: 'Override title'
title:
type: label
label: 'Title'
breadcrumb_enable:
type: boolean
label: 'Override breadcrumb'
breadcrumb:
type: label
label: 'Breadcrumb'
default_argument_type:
type: string
label: 'Type'
default_argument_options:
type: views.argument_default.[%parent.default_argument_type]
label: 'Default argument options'
default_argument_skip_url:
type: boolean
label: 'Skip default argument for view URL'
summary_options:
type: views.style.[%parent.summary.format]
label: 'Summary options'
summary:
type: mapping
label: 'Display a summary'
mapping:
sort_order:
type: string
label: 'Sort order'
number_of_records:
type: integer
label: 'Sort by'
format:
type: string
label: 'Format'
specify_validation:
type: boolean
label: 'Specify validation criteria'
validate:
type: mapping
label: 'Validation settings'
mapping:
type:
type: string
label: 'Validator'
fail:
type: string
label: 'Action to take if filter value does not validate'
validate_options:
type: views.argument_validator.[%parent.validate.type]
label: 'Validate options'
glossary:
type: boolean
label: 'Glossary mode'
limit:
type: integer
label: 'Character limit'
case:
type: string
label: 'Case'
path_case:
type: string
label: 'Case in path'
transform_dash:
type: boolean
label: 'Transform spaces to dashes in URL'
break_phrase:
type: boolean
label: 'Allow multiple values'
plugin_id:
type: string
label: 'Plugin ID'
views_exposed_form:
type: mapping
mapping:
submit_button:
type: label
label: 'Submit button text'
reset_button:
type: boolean
label: 'Include reset button'
reset_button_label:
type: label
label: 'Reset button label'