diff --git a/core/lib/Drupal/Component/Plugin/ConfigurablePluginInterface.php b/core/lib/Drupal/Component/Plugin/ConfigurablePluginInterface.php index 3c500ea..9be04bd 100644 --- a/core/lib/Drupal/Component/Plugin/ConfigurablePluginInterface.php +++ b/core/lib/Drupal/Component/Plugin/ConfigurablePluginInterface.php @@ -28,4 +28,12 @@ public function getConfiguration(); */ public function setConfiguration(array $configuration); + /** + * Returns default configuration for this plugin. + * + * @return array + * An associative array with the default configuration. + */ + public function getDefaultConfiguration(); + } diff --git a/core/lib/Drupal/Core/Action/ConfigurableActionBase.php b/core/lib/Drupal/Core/Action/ConfigurableActionBase.php index 25fe32f..bf9d72d 100644 --- a/core/lib/Drupal/Core/Action/ConfigurableActionBase.php +++ b/core/lib/Drupal/Core/Action/ConfigurableActionBase.php @@ -26,11 +26,9 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi } /** - * Returns default configuration for this action. - * - * @return array + * {@inheritdoc} */ - protected function getDefaultConfiguration() { + public function getDefaultConfiguration() { return array(); } diff --git a/core/modules/action/lib/Drupal/action/Plugin/Action/EmailAction.php b/core/modules/action/lib/Drupal/action/Plugin/Action/EmailAction.php index 970f1a6..68cb623 100644 --- a/core/modules/action/lib/Drupal/action/Plugin/Action/EmailAction.php +++ b/core/modules/action/lib/Drupal/action/Plugin/Action/EmailAction.php @@ -105,7 +105,7 @@ public function execute($entity = NULL) { /** * {@inheritdoc} */ - protected function getDefaultConfiguration() { + public function getDefaultConfiguration() { return array( 'recipient' => '', 'subject' => '', diff --git a/core/modules/action/lib/Drupal/action/Plugin/Action/GotoAction.php b/core/modules/action/lib/Drupal/action/Plugin/Action/GotoAction.php index cf4c323..c1e7d60 100644 --- a/core/modules/action/lib/Drupal/action/Plugin/Action/GotoAction.php +++ b/core/modules/action/lib/Drupal/action/Plugin/Action/GotoAction.php @@ -87,7 +87,7 @@ public function execute($object = NULL) { /** * {@inheritdoc} */ - protected function getDefaultConfiguration() { + public function getDefaultConfiguration() { return array( 'url' => '', ); diff --git a/core/modules/action/lib/Drupal/action/Plugin/Action/MessageAction.php b/core/modules/action/lib/Drupal/action/Plugin/Action/MessageAction.php index fef9ab9..305e6cb 100644 --- a/core/modules/action/lib/Drupal/action/Plugin/Action/MessageAction.php +++ b/core/modules/action/lib/Drupal/action/Plugin/Action/MessageAction.php @@ -61,7 +61,7 @@ public function execute($entity = NULL) { /** * {@inheritdoc} */ - protected function getDefaultConfiguration() { + public function getDefaultConfiguration() { return array( 'message' => '', ); diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/AggregatorPluginSettingsBase.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/AggregatorPluginSettingsBase.php index 55013e1..cd01c18 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/AggregatorPluginSettingsBase.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/AggregatorPluginSettingsBase.php @@ -19,6 +19,13 @@ /** * {@inheritdoc} */ + public function getDefaultConfiguration() { + return array(); + } + + /** + * {@inheritdoc} + */ public function validateConfigurationForm(array &$form, array &$form_state) { } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php index b174e29..cadf47c 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php @@ -23,9 +23,9 @@ class AggregatorCategoryBlock extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { // By default, the block will contain 10 feed items. return array( 'block_count' => 10, diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php index ca75c64..2f2576c 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php @@ -23,9 +23,9 @@ class AggregatorFeedBlock extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { // By default, the block will contain 10 feed items. return array( 'block_count' => 10, diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php index cdd7016..e47d894 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php @@ -75,9 +75,9 @@ public static function create(ContainerInterface $container, array $configuratio } /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'status' => TRUE, 'info' => '', diff --git a/core/modules/block/lib/Drupal/block/BlockBase.php b/core/modules/block/lib/Drupal/block/BlockBase.php index 3ed2f6f..d978949 100644 --- a/core/modules/block/lib/Drupal/block/BlockBase.php +++ b/core/modules/block/lib/Drupal/block/BlockBase.php @@ -27,7 +27,7 @@ public function __construct(array $configuration, $plugin_id, array $plugin_definition) { parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->configuration += $this->settings() + array( + $this->configuration += $this->getDefaultConfiguration() + array( 'label' => '', 'module' => $plugin_definition['module'], 'label_display' => BlockInterface::BLOCK_LABEL_VISIBLE, @@ -36,22 +36,6 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi } /** - * Returns plugin-specific settings for the block. - * - * Block plugins only need to override this method if they override the - * defaults provided in BlockBase::settings(). - * - * @return array - * An array of block-specific settings to override the defaults provided in - * BlockBase::settings(). - * - * @see \Drupal\block\BlockBase::settings(). - */ - public function settings() { - return array(); - } - - /** * {@inheritdoc} */ public function getConfiguration() { @@ -68,6 +52,13 @@ public function setConfiguration(array $configuration) { /** * {@inheritdoc} */ + public function getDefaultConfiguration() { + return array(); + } + + /** + * {@inheritdoc} + */ public function setConfigurationValue($key, $value) { $this->configuration[$key] = $value; } diff --git a/core/modules/block/lib/Drupal/block/BlockPluginInterface.php b/core/modules/block/lib/Drupal/block/BlockPluginInterface.php index d94d934..b5433e6 100644 --- a/core/modules/block/lib/Drupal/block/BlockPluginInterface.php +++ b/core/modules/block/lib/Drupal/block/BlockPluginInterface.php @@ -22,18 +22,6 @@ interface BlockPluginInterface extends ConfigurablePluginInterface, PluginFormInterface, PluginInspectionInterface { /** - * Returns the default settings for this block plugin. - * - * @return array - * An associative array of block settings for this block, keyed by the - * setting name. - * - * @todo Consider merging this with the general plugin configuration member - * variable and its getter/setter in http://drupal.org/node/1764380. - */ - public function settings(); - - /** * Indicates whether the block should be shown. * * This method allows base implementations to add general access restrictions diff --git a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php index 7194d20..3809da7 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php +++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php @@ -69,7 +69,7 @@ protected function defineOptions() { * An array of block-specific settings to override the defaults provided in * \Drupal\views\Plugin\Block\ViewsBlock::settings(). * - * @see \Drupal\views\Plugin\Block\ViewsBlock::settings(). + * @see \Drupal\views\Plugin\Block\ViewsBlock::getDefaultConfiguration() */ public function blockSettings(array $settings) { $settings['items_per_page'] = 'none'; diff --git a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php index 96f60b2..354aaec 100644 --- a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php +++ b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php @@ -24,7 +24,7 @@ class TestBlockInstantiation extends BlockBase { /** * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'display_message' => 'no message set', ); diff --git a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php index 847fb51..ac5e05e 100644 --- a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php +++ b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php @@ -22,11 +22,11 @@ class TestCacheBlock extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} * * Sets a different caching strategy for testing purposes. */ - public function settings() { + public function getDefaultConfiguration() { return array( 'cache' => DRUPAL_CACHE_PER_ROLE, ); diff --git a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestXSSTitleBlock.php b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestXSSTitleBlock.php index a9f36bb..daa0d22 100644 --- a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestXSSTitleBlock.php +++ b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestXSSTitleBlock.php @@ -20,11 +20,11 @@ class TestXSSTitleBlock extends TestCacheBlock { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} * * Sets a different caching strategy for testing purposes. */ - public function settings() { + public function getDefaultConfiguration() { return array( 'cache' => DRUPAL_NO_CACHE, ); diff --git a/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php b/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php index 887b7bd..a4182f0 100644 --- a/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php +++ b/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php @@ -22,9 +22,9 @@ class BookNavigationBlock extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'cache' => DRUPAL_CACHE_PER_PAGE | DRUPAL_CACHE_PER_ROLE, 'block_mode' => "all pages", diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishByKeywordComment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishByKeywordComment.php index d669db4..96534c8 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishByKeywordComment.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Action/UnpublishByKeywordComment.php @@ -40,7 +40,7 @@ public function execute($comment = NULL) { /** * {@inheritdoc} */ - protected function getDefaultConfiguration() { + public function getDefaultConfiguration() { return array( 'keywords' => array(), ); diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php b/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php index d133434..72e9fba 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php @@ -22,9 +22,9 @@ class RecentCommentsBlock extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'block_count' => 10, ); diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/FilterBase.php b/core/modules/filter/lib/Drupal/filter/Plugin/FilterBase.php index a37d483..8afe680 100644 --- a/core/modules/filter/lib/Drupal/filter/Plugin/FilterBase.php +++ b/core/modules/filter/lib/Drupal/filter/Plugin/FilterBase.php @@ -109,6 +109,13 @@ public function getConfiguration() { /** * {@inheritdoc} */ + public function getDefaultConfiguration() { + return array(); + } + + /** + * {@inheritdoc} + */ public function getType() { return $this->pluginDefinition['type']; } diff --git a/core/modules/forum/lib/Drupal/forum/Plugin/Block/ForumBlockBase.php b/core/modules/forum/lib/Drupal/forum/Plugin/Block/ForumBlockBase.php index cbdfc79..f5e7c69 100644 --- a/core/modules/forum/lib/Drupal/forum/Plugin/Block/ForumBlockBase.php +++ b/core/modules/forum/lib/Drupal/forum/Plugin/Block/ForumBlockBase.php @@ -15,9 +15,9 @@ abstract class ForumBlockBase extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'cache' => DRUPAL_CACHE_CUSTOM, 'properties' => array( diff --git a/core/modules/image/lib/Drupal/image/ImageEffectBase.php b/core/modules/image/lib/Drupal/image/ImageEffectBase.php index 2babe0d..158874d 100644 --- a/core/modules/image/lib/Drupal/image/ImageEffectBase.php +++ b/core/modules/image/lib/Drupal/image/ImageEffectBase.php @@ -103,10 +103,17 @@ public function setConfiguration(array $configuration) { 'uuid' => '', 'weight' => '', ); - $this->configuration = $configuration['data']; + $this->configuration = $configuration['data'] + $this->getDefaultConfiguration(); $this->uuid = $configuration['uuid']; $this->weight = $configuration['weight']; return $this; } + /** + * {@inheritdoc} + */ + public function getDefaultConfiguration() { + return array(); + } + } diff --git a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/CropImageEffect.php b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/CropImageEffect.php index e46d2fa..fcd831b 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/CropImageEffect.php +++ b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/CropImageEffect.php @@ -26,11 +26,6 @@ class CropImageEffect extends ResizeImageEffect { * {@inheritdoc} */ public function applyEffect(ImageInterface $image) { - // Set sane default values. - $this->configuration += array( - 'anchor' => 'center-center', - ); - list($x, $y) = explode('-', $this->configuration['anchor']); $x = image_filter_keyword($x, $image->getWidth(), $this->configuration['width']); $y = image_filter_keyword($y, $image->getHeight(), $this->configuration['height']); @@ -54,12 +49,16 @@ public function getSummary() { /** * {@inheritdoc} */ - public function getForm() { - $this->configuration += array( - 'width' => '', - 'height' => '', + public function getDefaultConfiguration() { + return parent::getDefaultConfiguration() + array( 'anchor' => 'center-center', ); + } + + /** + * {@inheritdoc} + */ + public function getForm() { $form = parent::getForm(); $form['anchor'] = array( '#type' => 'radios', diff --git a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ResizeImageEffect.php b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ResizeImageEffect.php index 766e5a7..fdbcabd 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ResizeImageEffect.php +++ b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ResizeImageEffect.php @@ -57,11 +57,21 @@ public function getSummary() { /** * {@inheritdoc} */ + public function getDefaultConfiguration() { + return array( + 'width' => NULL, + 'height' => NULL, + ); + } + + /** + * {@inheritdoc} + */ public function getForm() { $form['width'] = array( '#type' => 'number', '#title' => t('Width'), - '#default_value' => isset($this->configuration['width']) ? $this->configuration['width'] : '', + '#default_value' => $this->configuration['width'], '#field_suffix' => ' ' . t('pixels'), '#required' => TRUE, '#min' => 1, @@ -69,7 +79,7 @@ public function getForm() { $form['height'] = array( '#type' => 'number', '#title' => t('Height'), - '#default_value' => isset($this->configuration['height']) ? $this->configuration['height'] : '', + '#default_value' => $this->configuration['height'], '#field_suffix' => ' ' . t('pixels'), '#required' => TRUE, '#min' => 1, diff --git a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/RotateImageEffect.php b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/RotateImageEffect.php index fe563ae..b6d571c 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/RotateImageEffect.php +++ b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/RotateImageEffect.php @@ -28,13 +28,6 @@ class RotateImageEffect extends ImageEffectBase implements ConfigurableImageEffe * {@inheritdoc} */ public function applyEffect(ImageInterface $image) { - // Set sane default values. - $this->configuration += array( - 'degrees' => 0, - 'bgcolor' => NULL, - 'random' => FALSE, - ); - // Convert short #FFF syntax to full #FFFFFF syntax. if (strlen($this->configuration['bgcolor']) == 4) { $c = $this->configuration['bgcolor']; @@ -92,10 +85,21 @@ public function getSummary() { /** * {@inheritdoc} */ + public function getDefaultConfiguration() { + return array( + 'degrees' => 0, + 'bgcolor' => NULL, + 'random' => FALSE, + ); + } + + /** + * {@inheritdoc} + */ public function getForm() { $form['degrees'] = array( '#type' => 'number', - '#default_value' => (isset($this->configuration['degrees'])) ? $this->configuration['degrees'] : 0, + '#default_value' => $this->configuration['degrees'], '#title' => t('Rotation angle'), '#description' => t('The number of degrees the image should be rotated. Positive numbers are clockwise, negative are counter-clockwise.'), '#field_suffix' => '°', @@ -103,7 +107,7 @@ public function getForm() { ); $form['bgcolor'] = array( '#type' => 'textfield', - '#default_value' => (isset($this->configuration['bgcolor'])) ? $this->configuration['bgcolor'] : '#FFFFFF', + '#default_value' => $this->configuration['bgcolor'], '#title' => t('Background color'), '#description' => t('The background color to use for exposed areas of the image. Use web-style hex colors (#FFFFFF for white, #000000 for black). Leave blank for transparency on image types that support it.'), '#size' => 7, @@ -112,7 +116,7 @@ public function getForm() { ); $form['random'] = array( '#type' => 'checkbox', - '#default_value' => (isset($this->configuration['random'])) ? $this->configuration['random'] : 0, + '#default_value' => $this->configuration['random'], '#title' => t('Randomize'), '#description' => t('Randomize the rotation angle for each image. The angle specified above is used as a maximum.'), ); diff --git a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ScaleImageEffect.php b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ScaleImageEffect.php index c7b2f53..984d99b 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ScaleImageEffect.php +++ b/core/modules/image/lib/Drupal/image/Plugin/ImageEffect/ScaleImageEffect.php @@ -27,13 +27,6 @@ class ScaleImageEffect extends ResizeImageEffect { * {@inheritdoc} */ public function applyEffect(ImageInterface $image) { - // Set sane default values. - $this->configuration += array( - 'width' => NULL, - 'height' => NULL, - 'upscale' => FALSE, - ); - if (!$image->scale($this->configuration['width'], $this->configuration['height'], $this->configuration['upscale'])) { watchdog('image', 'Image scale failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->getToolkitId(), '%path' => $image->getSource(), '%mimetype' => $image->getMimeType(), '%dimensions' => $image->getWidth() . 'x' . $image->getHeight()), WATCHDOG_ERROR); return FALSE; @@ -63,6 +56,15 @@ public function getSummary() { /** * {@inheritdoc} */ + public function getDefaultConfiguration() { + return parent::getDefaultConfiguration() + array( + 'upscale' => FALSE, + ); + } + + /** + * {@inheritdoc} + */ public function getForm() { $form = parent::getForm(); $form['#element_validate'] = array(array($this, 'validateScaleEffect')); @@ -70,7 +72,7 @@ public function getForm() { $form['height']['#required'] = FALSE; $form['upscale'] = array( '#type' => 'checkbox', - '#default_value' => (isset($this->configuration['upscale'])) ? $this->configuration['upscale'] : 0, + '#default_value' => $this->configuration['upscale'], '#title' => t('Allow Upscaling'), '#description' => t('Let scale make images larger than their original size'), ); diff --git a/core/modules/node/lib/Drupal/node/Plugin/Action/AssignOwnerNode.php b/core/modules/node/lib/Drupal/node/Plugin/Action/AssignOwnerNode.php index 7a2753c..6f49e37 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Action/AssignOwnerNode.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Action/AssignOwnerNode.php @@ -70,7 +70,7 @@ public function execute($entity = NULL) { /** * {@inheritdoc} */ - protected function getDefaultConfiguration() { + public function getDefaultConfiguration() { return array( 'owner_uid' => '', ); diff --git a/core/modules/node/lib/Drupal/node/Plugin/Action/UnpublishByKeywordNode.php b/core/modules/node/lib/Drupal/node/Plugin/Action/UnpublishByKeywordNode.php index a525802..bc01b7b 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Action/UnpublishByKeywordNode.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Action/UnpublishByKeywordNode.php @@ -39,7 +39,7 @@ public function execute($node = NULL) { /** * {@inheritdoc} */ - protected function getDefaultConfiguration() { + public function getDefaultConfiguration() { return array( 'keywords' => array(), ); diff --git a/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php b/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php index 3d50cc2..ea0cab1 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php @@ -22,9 +22,9 @@ class RecentContentBlock extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'block_count' => 10, ); diff --git a/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php b/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php index bca0889..3acf4f7 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php @@ -22,9 +22,9 @@ class SyndicateBlock extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'block_count' => 10, ); diff --git a/core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php b/core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php index 640ece1..45a64c3 100644 --- a/core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php +++ b/core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php @@ -43,9 +43,9 @@ class StatisticsPopularBlock extends BlockBase { protected $last_list; /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'top_day_num' => 0, 'top_all_num' => 0, diff --git a/core/modules/user/lib/Drupal/user/Plugin/Action/ChangeUserRoleBase.php b/core/modules/user/lib/Drupal/user/Plugin/Action/ChangeUserRoleBase.php index 079f066..0d7afa6 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Action/ChangeUserRoleBase.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Action/ChangeUserRoleBase.php @@ -17,7 +17,7 @@ /** * {@inheritdoc} */ - protected function getDefaultConfiguration() { + public function getDefaultConfiguration() { return array( 'rid' => '', ); diff --git a/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php b/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php index 01209c5..6d8bb4e 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php @@ -22,9 +22,9 @@ class UserNewBlock extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'properties' => array( 'administrative' => TRUE diff --git a/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php b/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php index 1b1e506..882dd50 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php +++ b/core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php @@ -25,9 +25,9 @@ class UserOnlineBlock extends BlockBase { /** - * Overrides \Drupal\block\BlockBase::settings(). + * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { return array( 'properties' => array( 'administrative' => TRUE diff --git a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php index 02daf5a..8eb50ee 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php @@ -45,7 +45,7 @@ public function build() { /** * {@inheritdoc} */ - public function settings() { + public function getDefaultConfiguration() { $settings = array(); if ($this->displaySet) {