core/modules/block/lib/Drupal/block/BlockBase.php | 6 ++++++ core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php | 6 +++--- .../block/lib/Drupal/block/Tests/BlockStorageUnitTest.php | 6 +++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index 4cdc9b4..9d03d08 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -49,6 +49,12 @@ public function setConfiguration(array $configuration) { $this->baseConfigurationDefaults(); } + /** + * Returns generic default configuration for block plugins. + * + * @return array + * An associative array with the default configuration. + */ protected function baseConfigurationDefaults() { return array( 'label' => '', diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php index ab4f4c1..7bbfa37 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockInterfaceTest.php @@ -45,12 +45,12 @@ public function testBlockInterface() { ); $expected_configuration = array( 'label' => 'Custom Display Message', - 'cache' => array( - 'max_age' => 0, - ), 'display_message' => 'no message set', 'module' => 'block_test', 'label_display' => BlockInterface::BLOCK_LABEL_VISIBLE, + 'cache' => array( + 'max_age' => 0, + ), ); // Initial configuration of the block at construction time. $display_block = $manager->createInstance('test_block_instantiation', $configuration); diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php index 7f7192f..dcec0b4 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php @@ -99,12 +99,12 @@ protected function createTests() { 'region' => '-1', 'plugin' => 'test_html', 'settings' => array( - 'cache' => array( - 'max_age' => 0, - ), 'label' => '', 'module' => 'block_test', 'label_display' => BlockInterface::BLOCK_LABEL_VISIBLE, + 'cache' => array( + 'max_age' => 0, + ), ), 'visibility' => NULL, );