summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2015-03-16 09:04:03 +0000
committerAlex Pott2015-03-16 09:04:03 +0000
commitb9045f6f3a2bb17fc9eef49ad791e7f0d1686fd8 (patch)
tree0b940762554c4d8d82a5b686a659e81a62fa6342
parent88dbc3877f11bfd12852deafa2577090726d4472 (diff)
Issue #2429157 by root_brute, joshi.rohit100, rpayanm, rteijeiro, hussainweb, sidharthap: Remove TypedConfigInterface::set()
-rw-r--r--core/lib/Drupal/Core/Config/Schema/ArrayElement.php12
-rw-r--r--core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php12
-rw-r--r--core/modules/config/src/Tests/ConfigSchemaTest.php7
3 files changed, 0 insertions, 31 deletions
diff --git a/core/lib/Drupal/Core/Config/Schema/ArrayElement.php b/core/lib/Drupal/Core/Config/Schema/ArrayElement.php
index 847135e..1b314ac 100644
--- a/core/lib/Drupal/Core/Config/Schema/ArrayElement.php
+++ b/core/lib/Drupal/Core/Config/Schema/ArrayElement.php
@@ -101,18 +101,6 @@ abstract class ArrayElement extends TypedData implements \IteratorAggregate, Typ
/**
* {@inheritdoc}
*/
- public function set($key, $value) {
- $this->value[$key] = $value;
- // Parsed elements must be rebuilt with new values
- unset($this->elements);
- // Directly notify ourselves.
- $this->onChange($key, $value);
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
public function getElements() {
if (!isset($this->elements)) {
$this->elements = $this->parse();
diff --git a/core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php b/core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php
index 0847df0..0530560 100644
--- a/core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php
+++ b/core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php
@@ -54,18 +54,6 @@ interface TypedConfigInterface extends TraversableTypedDataInterface {
public function get($name);
/**
- * Replaces the item at the specified position in this list.
- *
- * @param int|string $key
- * Property name or index of the item to replace.
- * @param mixed $value
- * Value to be stored at the specified position.
- *
- * @return $this
- */
- public function set($key, $value);
-
- /**
* Returns an array of all property values.
*
* @return array
diff --git a/core/modules/config/src/Tests/ConfigSchemaTest.php b/core/modules/config/src/Tests/ConfigSchemaTest.php
index 37adff0..ca53a53 100644
--- a/core/modules/config/src/Tests/ConfigSchemaTest.php
+++ b/core/modules/config/src/Tests/ConfigSchemaTest.php
@@ -315,13 +315,6 @@ class ConfigSchemaTest extends KernelTestBase {
$this->assertTrue(!$effect['data']->isEmpty() && $effect['id']->getValue() == 'image_scale', 'Got data for the image scale effect from metadata.');
$this->assertTrue($effect['data']->get('width') instanceof IntegerInterface, 'Got the right type for the scale effect width.');
$this->assertEqual($effect['data']->get('width')->getValue(), 480, 'Got the right value for the scale effect width.' );
-
- // Finally update some object using a configuration wrapper.
- $new_slogan = 'Site slogan for testing configuration metadata';
- $wrapper = \Drupal::service('config.typed')->get('system.site');
- $wrapper->set('slogan', $new_slogan);
- $site_slogan = $wrapper->get('slogan');
- $this->assertEqual($site_slogan->getValue(), $new_slogan, 'Successfully updated the contained configuration data');
}
/**