Commit 3fc8919e authored by catch's avatar catch

Issue #2113337 by Xano: Fixed Rename \Drupal\Component\Plugin\PluginBag::*ID(s)() to *Id(s)().

parent bb5048e7
...@@ -78,7 +78,7 @@ protected function initializePlugin($instance_id) { ...@@ -78,7 +78,7 @@ protected function initializePlugin($instance_id) {
throw new UnknownPluginException($instance_id); throw new UnknownPluginException($instance_id);
} }
$this->pluginInstances[$instance_id] = $this->manager->createInstance($configuration[$this->pluginKey], $configuration); $this->pluginInstances[$instance_id] = $this->manager->createInstance($configuration[$this->pluginKey], $configuration);
$this->addInstanceID($instance_id); $this->addInstanceId($instance_id);
} }
/** /**
...@@ -152,8 +152,8 @@ public function setConfiguration($instance_id, array $configuration) { ...@@ -152,8 +152,8 @@ public function setConfiguration($instance_id, array $configuration) {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function removeInstanceID($instance_id) { public function removeInstanceId($instance_id) {
parent::removeInstanceID($instance_id); parent::removeInstanceId($instance_id);
unset($this->originalOrder[$instance_id]); unset($this->originalOrder[$instance_id]);
unset($this->configurations[$instance_id]); unset($this->configurations[$instance_id]);
} }
......
...@@ -100,7 +100,7 @@ public function remove($instance_id) { ...@@ -100,7 +100,7 @@ public function remove($instance_id) {
* @param string $id * @param string $id
* The ID of the plugin instance to add. * The ID of the plugin instance to add.
*/ */
public function addInstanceID($id) { public function addInstanceId($id) {
if (!isset($this->instanceIDs[$id])) { if (!isset($this->instanceIDs[$id])) {
$this->instanceIDs[$id] = $id; $this->instanceIDs[$id] = $id;
} }
...@@ -112,7 +112,7 @@ public function addInstanceID($id) { ...@@ -112,7 +112,7 @@ public function addInstanceID($id) {
* @return array * @return array
* An array of all available instance IDs. * An array of all available instance IDs.
*/ */
public function getInstanceIDs() { public function getInstanceIds() {
return $this->instanceIDs; return $this->instanceIDs;
} }
...@@ -122,7 +122,7 @@ public function getInstanceIDs() { ...@@ -122,7 +122,7 @@ public function getInstanceIDs() {
* @param array $instance_ids * @param array $instance_ids
* An associative array of instance IDs. * An associative array of instance IDs.
*/ */
public function setInstanceIDs(array $instance_ids) { public function setInstanceIds(array $instance_ids) {
$this->instanceIDs = $instance_ids; $this->instanceIDs = $instance_ids;
} }
...@@ -132,7 +132,7 @@ public function setInstanceIDs(array $instance_ids) { ...@@ -132,7 +132,7 @@ public function setInstanceIDs(array $instance_ids) {
* @param string $instance_id * @param string $instance_id
* An image effect instance IDs. * An image effect instance IDs.
*/ */
public function removeInstanceID($instance_id) { public function removeInstanceId($instance_id) {
unset($this->instanceIDs[$instance_id]); unset($this->instanceIDs[$instance_id]);
$this->remove($instance_id); $this->remove($instance_id);
} }
......
...@@ -340,7 +340,7 @@ public function getPathToken($uri) { ...@@ -340,7 +340,7 @@ public function getPathToken($uri) {
* {@inheritdoc} * {@inheritdoc}
*/ */
public function deleteImageEffect(ImageEffectInterface $effect) { public function deleteImageEffect(ImageEffectInterface $effect) {
$this->getEffects()->removeInstanceID($effect->getUuid()); $this->getEffects()->removeInstanceId($effect->getUuid());
$this->save(); $this->save();
return $this; return $this;
} }
......
...@@ -44,7 +44,7 @@ public function updateConfiguration(array $configuration) { ...@@ -44,7 +44,7 @@ public function updateConfiguration(array $configuration) {
} }
$instance_id = $configuration['uuid']; $instance_id = $configuration['uuid'];
$this->setConfiguration($instance_id, $configuration); $this->setConfiguration($instance_id, $configuration);
$this->addInstanceID($instance_id); $this->addInstanceId($instance_id);
return $instance_id; return $instance_id;
} }
......
...@@ -106,7 +106,7 @@ public function getPlugin() { ...@@ -106,7 +106,7 @@ public function getPlugin() {
*/ */
public function setPlugin($plugin_id) { public function setPlugin($plugin_id) {
$this->plugin = $plugin_id; $this->plugin = $plugin_id;
$this->pluginBag->addInstanceID($plugin_id); $this->pluginBag->addInstanceId($plugin_id);
} }
/** /**
......
...@@ -720,7 +720,7 @@ public function newDisplay($plugin_id = 'page', $title = NULL, $id = NULL) { ...@@ -720,7 +720,7 @@ public function newDisplay($plugin_id = 'page', $title = NULL, $id = NULL) {
$this->initDisplay(); $this->initDisplay();
$id = $this->storage->addDisplay($plugin_id, $title, $id); $id = $this->storage->addDisplay($plugin_id, $title, $id);
$this->displayHandlers->addInstanceID($id); $this->displayHandlers->addInstanceId($id);
$display = $this->displayHandlers->get($id); $display = $this->displayHandlers->get($id);
$display->newDisplay(); $display->newDisplay();
......
...@@ -203,14 +203,14 @@ public function testGetConfiguration() { ...@@ -203,14 +203,14 @@ public function testGetConfiguration() {
$config = $this->defaultPluginBag->getConfiguration(); $config = $this->defaultPluginBag->getConfiguration();
$this->assertSame($expected, array_keys($config), 'The order of the configuration is unchanged.'); $this->assertSame($expected, array_keys($config), 'The order of the configuration is unchanged.');
$ids = $this->defaultPluginBag->getInstanceIDs(); $ids = $this->defaultPluginBag->getInstanceIds();
$this->assertSame($expected, array_keys($ids), 'The order of the instances is unchanged.'); $this->assertSame($expected, array_keys($ids), 'The order of the instances is unchanged.');
$this->defaultPluginBag->sort(); $this->defaultPluginBag->sort();
$config = $this->defaultPluginBag->getConfiguration(); $config = $this->defaultPluginBag->getConfiguration();
$this->assertSame($expected, array_keys($config), 'After sorting, the order of the configuration is unchanged.'); $this->assertSame($expected, array_keys($config), 'After sorting, the order of the configuration is unchanged.');
$ids = $this->defaultPluginBag->getInstanceIDs(); $ids = $this->defaultPluginBag->getInstanceIds();
sort($expected); sort($expected);
$this->assertSame($expected, array_keys($ids), 'After sorting, the order of the instances is also sorted.'); $this->assertSame($expected, array_keys($ids), 'After sorting, the order of the instances is also sorted.');
} }
......
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