diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php index 0521aa9..5941859 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php @@ -43,7 +43,7 @@ function setUp() { */ function testBlockRenderOrder() { // Enable test blocks and place them in the same region. - $region = 'header'; + $region = 'header_second'; $test_blocks = array( 'stark_powered' => array( 'weight' => '-3', diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockSystemBrandingTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockSystemBrandingTest.php index 192d8fc..9a74e94 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockSystemBrandingTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockSystemBrandingTest.php @@ -40,7 +40,7 @@ public function setUp() { ->set('slogan', 'Community plumbing') ->save(); // Add the system branding block to the page. - $this->drupalPlaceBlock('system_branding_block', array('region' => 'header', 'id' => 'site-branding')); + $this->drupalPlaceBlock('system_branding_block', array('region' => 'header_second', 'id' => 'site-branding')); } /** diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php index e7b99e1..b6e9101 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockTest.php @@ -104,7 +104,7 @@ function testBlock() { $block['id'] = 'system_powered_by_block'; $block['settings[label]'] = $this->randomName(8); $block['theme'] = \Drupal::config('system.theme')->get('default'); - $block['region'] = 'header'; + $block['region'] = 'header_second'; // Set block title to confirm that interface works and override any custom titles. $this->drupalPostForm('admin/structure/block/add/' . $block['id'] . '/' . $block['theme'], array('settings[label]' => $block['settings[label]'], 'id' => $block['id'], 'region' => $block['region']), t('Save block')); @@ -224,7 +224,7 @@ function testHideBlockTitle() { * - delta: The block's delta key. * @param string $region * The machine name of the theme region to move the block to, for example - * 'header' or 'sidebar_first'. + * 'header_second' or 'sidebar_first'. */ function moveBlockToRegion(array $block, $region) { // Set the created block to a specific region. @@ -262,8 +262,9 @@ function testBlockRehash() { $block = array(); $block['id'] = 'test_cache'; $block['theme'] = \Drupal::config('system.theme')->get('default'); - $block['region'] = 'header'; - $block = $this->drupalPlaceBlock('test_cache', array('region' => 'header')); + $block['region'] = 'header_second'; + $block = $this->drupalPlaceBlock('test_cache', array('region' => 'header_second')); + $block = $this->drupalPlaceBlock('test_cache', array('region' => 'header_second')); // Our test block's caching should default to DRUPAL_CACHE_PER_ROLE. $settings = $block->get('settings'); diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php index 356d480..27f82ad 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockUiTest.php @@ -110,8 +110,8 @@ function testBlockAdminUiPage() { $this->assertTrue((string) $element[0] == $label, 'The "' . $label . '" block title is set inside the ' . $values['settings']['region'] . ' region.'); // Look for a test block region select form element. $this->assertField('blocks[' . $values['settings']['id'] . '][region]', 'The block "' . $values['label'] . '" has a region assignment field.'); - // Move the test block to the header region. - $edit['blocks[' . $values['settings']['id'] . '][region]'] = 'header'; + // Move the test block to the header_second region. + $edit['blocks[' . $values['settings']['id'] . '][region]'] = 'header_second'; // Look for a test block weight select form element. $this->assertField('blocks[' . $values['settings']['id'] . '][weight]', 'The block "' . $values['label'] . '" has a weight assignment field.'); // Change the test block's weight. @@ -122,8 +122,8 @@ function testBlockAdminUiPage() { // Check if the region and weight settings changes have persisted. $this->assertOptionSelected( 'edit-blocks-' . $values['settings']['id'] . '-region', - 'header', - 'The block "' . $label . '" has the correct region assignment (header).' + 'header_second', + 'The block "' . $label . '" has the correct region assignment (header_second).' ); $this->assertOptionSelected( 'edit-blocks-' . $values['settings']['id'] . '-weight', diff --git a/core/themes/bartik/config/schema/block.block.bartik.branding.schema.yml b/core/themes/bartik/config/schema/block.block.bartik.branding.schema.yml new file mode 100644 index 0000000..57cd696 --- /dev/null +++ b/core/themes/bartik/config/schema/block.block.bartik.branding.schema.yml @@ -0,0 +1,92 @@ +# Schema for the configuration files of the Block module. + +block.block.bartik.branding: + type: mapping + label: 'Block' + mapping: + id: + type: string + label: 'ID' + uuid: + type: string + label: 'UUID' + theme: + type: string + label: 'Theme' + 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' + plugin: + type: string + label: 'Plugin' + settings: + type: mapping + label: 'Block settings' + mapping: + label: + type: label + label: 'Description' + label_display: + type: string + label: 'Display title' + cache: + type: integer + label: 'Cache' + status: + type: boolean + label: 'Status' + info: + type: label + label: 'Admin info' + view_mode: + type: string + label: 'View mode' + module: + type: string + label: 'Module' + langcode: + type: string + label: 'Default language' diff --git a/core/themes/stark/config/schema/block.block.stark.branding.schema.yml b/core/themes/stark/config/schema/block.block.stark.branding.schema.yml new file mode 100644 index 0000000..57cd696 --- /dev/null +++ b/core/themes/stark/config/schema/block.block.stark.branding.schema.yml @@ -0,0 +1,92 @@ +# Schema for the configuration files of the Block module. + +block.block.bartik.branding: + type: mapping + label: 'Block' + mapping: + id: + type: string + label: 'ID' + uuid: + type: string + label: 'UUID' + theme: + type: string + label: 'Theme' + 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' + plugin: + type: string + label: 'Plugin' + settings: + type: mapping + label: 'Block settings' + mapping: + label: + type: label + label: 'Description' + label_display: + type: string + label: 'Display title' + cache: + type: integer + label: 'Cache' + status: + type: boolean + label: 'Status' + info: + type: label + label: 'Admin info' + view_mode: + type: string + label: 'View mode' + module: + type: string + label: 'Module' + langcode: + type: string + label: 'Default language'