X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fentityqueue%2Fsrc%2FEntityQueueHandlerBase.php;h=cd989a153effe0649d136de7e657ac2b65bb6681;hp=94cc9d2c77abea7d222ff70ebc7b34ddb48a91d2;hb=059867c3f96750652c80f39e44c442a58c2549ee;hpb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2 diff --git a/web/modules/contrib/entityqueue/src/EntityQueueHandlerBase.php b/web/modules/contrib/entityqueue/src/EntityQueueHandlerBase.php index 94cc9d2c7..cd989a153 100644 --- a/web/modules/contrib/entityqueue/src/EntityQueueHandlerBase.php +++ b/web/modules/contrib/entityqueue/src/EntityQueueHandlerBase.php @@ -3,6 +3,7 @@ namespace Drupal\entityqueue; use Drupal\Component\Plugin\PluginBase; +use Drupal\Component\Utility\NestedArray; use Drupal\Core\DependencyInjection\DependencySerializationTrait; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Form\FormStateInterface; @@ -28,7 +29,7 @@ abstract class EntityQueueHandlerBase extends PluginBase implements EntityQueueH */ public function __construct(array $configuration, $plugin_id, array $plugin_definition) { parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->configuration += $this->defaultConfiguration(); + $this->setConfiguration($configuration); } /** @@ -42,7 +43,7 @@ abstract class EntityQueueHandlerBase extends PluginBase implements EntityQueueH * {@inheritdoc} */ public function setConfiguration(array $configuration) { - $this->configuration = $configuration; + $this->configuration = NestedArray::mergeDeep($this->defaultConfiguration(), $configuration); } /** @@ -106,26 +107,26 @@ abstract class EntityQueueHandlerBase extends PluginBase implements EntityQueueH /** * {@inheritdoc} */ - public function onQueuePreSave(EntityQueueInterface $queue, EntityStorageInterface $storage) { } + public function onQueuePreSave(EntityQueueInterface $queue, EntityStorageInterface $storage) {} /** * {@inheritdoc} */ - public function onQueuePostSave(EntityQueueInterface $queue, EntityStorageInterface $storage, $update = TRUE) { } + public function onQueuePostSave(EntityQueueInterface $queue, EntityStorageInterface $storage, $update = TRUE) {} /** * {@inheritdoc} */ - public function onQueuePreDelete(EntityQueueInterface $queue, EntityStorageInterface $storage) { } + public function onQueuePreDelete(EntityQueueInterface $queue, EntityStorageInterface $storage) {} /** * {@inheritdoc} */ - public function onQueuePostDelete(EntityQueueInterface $queue, EntityStorageInterface $storage) { } + public function onQueuePostDelete(EntityQueueInterface $queue, EntityStorageInterface $storage) {} /** * {@inheritdoc} */ - public function onQueuePostLoad(EntityQueueInterface $queue, EntityStorageInterface $storage) { } + public function onQueuePostLoad(EntityQueueInterface $queue, EntityStorageInterface $storage) {} }