// Track each instance ID as it is updated.
$unprocessed_instance_ids =
$this->
getInstanceIds();
foreach ($configuration as $instance_id =>
$instance_configuration) { $this->
setInstanceConfiguration($instance_id,
$instance_configuration);
// Remove this instance ID from the list being updated.
unset($unprocessed_instance_ids[$instance_id]);
} // Remove remaining instances that had no configuration specified for them.
foreach ($unprocessed_instance_ids as $unprocessed_instance_id) { $this->
removeInstanceId($unprocessed_instance_id);
} return $this;
} /**
* Updates the configuration for a plugin instance.
*
* If there is no plugin instance yet, a new will be instantiated. Otherwise,
* the existing instance is updated with the new configuration.
*
* @param string $instance_id
* The ID of a plugin to set the configuration for.
* @param array $configuration
* The plugin configuration to set.
*/