Commit 3b449413 authored by webchick's avatar webchick
Browse files

Issue #1948884 by vijaycs85, YesCT, Gábor Hojtsy: Create configuration schemas...

Issue #1948884 by vijaycs85, YesCT, Gábor Hojtsy: Create configuration schemas for block and custom_block() modules.
parent f7dcd4fe
# Schema for the configuration files of the Block module.
block.block.*.*:
type: mapping
label: 'Block'
mapping:
id:
type: string
label: 'ID'
label:
type: label
label: 'Title'
label_display:
type: string
label: 'Display title'
uuid:
type: string
label: 'UUID'
region:
type: string
label: 'Region'
weight:
type: integer
label: 'Weight'
module:
type: string
label: 'Module'
status:
type: boolean
label: 'Status'
visibility:
type: mapping
label: 'Visibility settings'
mapping:
path:
type: mapping
label: 'Pages'
mapping:
visibility:
type: integer
label: 'Visibility'
pages:
type: string
label: 'Show block on specific pages'
role:
type: mapping
label: 'Roles'
mapping:
roles:
type: sequence
label: 'Show block for specific roles'
sequence:
- type: string
label: 'Role'
node_type:
type: mapping
label: 'Content types'
mapping:
types:
type: sequence
label: 'Show block for specific content types'
sequence:
- type: string
label: 'Node type'
visibility__active_tab:
type: string
label: 'Visibility active tab'
plugin:
type: string
label: 'Plugin'
settings:
type: mapping
label: 'Block settings'
mapping:
admin_label:
type: label
label: 'Description'
cache:
type: integer
label: 'Cache'
status:
type: boolean
label: 'Status'
info:
type: label
label: 'Admin info'
view_mode:
type: string
label: 'View mode'
langcode:
type: string
label: 'Language code'
# Schema for the configuration files of the Custom Block module.
custom_block.type.*:
type: mapping
label: 'Custom block type settings'
mapping:
id:
type: string
label: 'Machine-readable name'
uuid:
type: string
label: 'UUID'
label:
type: label
label: 'Label'
revision:
type: integer
label: 'Create new revision'
description:
type: text
label: 'Description'
status:
type: boolean
label: 'Status'
langcode:
type: string
label: 'Default language'
......@@ -104,6 +104,11 @@ function assertModuleConfig($module) {
// Verify that the module's default config directory is not empty and
// contains default configuration files (instead of something else).
$all_names = $module_file_storage->listAll();
if (empty($all_names)) {
// Module has an empty config directory. For example it might contain a
// schema directory.
return;
}
$this->assertTrue($all_names);
// Look up each default configuration object name in the active
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment