diff --git a/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsInterface.php b/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsInterface.php index f016d65..30109e0 100644 --- a/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsInterface.php +++ b/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsInterface.php @@ -29,7 +29,7 @@ * * @return $this * - * @throws \Drupal\Core\Config\ConfigException + * @throws \Drupal\Core\Config\Entity\ThirdPartySettingsException * If the third party providers property is not an array. */ public function setThirdPartySetting($module, $key, $value); @@ -47,7 +47,7 @@ public function setThirdPartySetting($module, $key, $value); * @return mixed * The value. * - * @throws \Drupal\Core\Config\ConfigException + * @throws \Drupal\Core\Config\Entity\ThirdPartySettingsException * If the third party providers property is not an array. */ public function getThirdPartySetting($module, $key, $default); @@ -63,7 +63,7 @@ public function getThirdPartySetting($module, $key, $default); * @return mixed * The value. * - * @throws \Drupal\Core\Config\ConfigException + * @throws \Drupal\Core\Config\Entity\ThirdPartySettingsException * If the third party providers property is not an array. */ public function unsetThirdPartySetting($module, $key); @@ -74,7 +74,7 @@ public function unsetThirdPartySetting($module, $key); * @return array * The list of third parties. * - * @throws \Drupal\Core\Config\ConfigException + * @throws \Drupal\Core\Config\Entity\ThirdPartySettingsException * If the third party providers property is not an array. */ public function getThirdPartyProviders(); diff --git a/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsTrait.php b/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsTrait.php index 7161e78..6433e64 100644 --- a/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsTrait.php +++ b/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsTrait.php @@ -7,8 +7,6 @@ namespace Drupal\Core\Config\Entity; -use Drupal\Core\Config\ConfigException; - /** * Provides generic implementation of ThirdPartySettingsInterface. * @@ -41,7 +39,7 @@ * * @return $this * - * @throws \Drupal\Core\Config\ConfigException + * @throws \Drupal\Core\Config\Entity\ThirdPartySettingsException * If the third party providers property is not an array. */ public function setThirdPartySetting($module, $key, $value) { @@ -63,7 +61,7 @@ public function setThirdPartySetting($module, $key, $value) { * @return mixed * The value. * - * @throws \Drupal\Core\Config\ConfigException + * @throws \Drupal\Core\Config\Entity\ThirdPartySettingsException * If the third party providers property is not an array. */ public function getThirdPartySetting($module, $key, $default = NULL) { @@ -87,7 +85,7 @@ public function getThirdPartySetting($module, $key, $default = NULL) { * @return mixed * The value. * - * @throws \Drupal\Core\Config\ConfigException + * @throws \Drupal\Core\Config\Entity\ThirdPartySettingsException * If the third party providers property is not an array. */ public function unsetThirdPartySetting($module, $key) { @@ -107,7 +105,7 @@ public function unsetThirdPartySetting($module, $key) { * @return array * The list of third parties. * - * @throws \Drupal\Core\Config\ConfigException + * @throws \Drupal\Core\Config\Entity\ThirdPartySettingsException * If the third party providers property is not an array. */ public function getThirdPartyProviders() { @@ -118,12 +116,12 @@ public function getThirdPartyProviders() { /** * Checks that the third party settings property is an array. * - * @throws \Drupal\Core\Config\ConfigException + * @throws \Drupal\Core\Config\Entity\ThirdPartySettingsException * If the third party providers property is not an array. */ protected function checkThirdPartyArray() { if (!is_array($this->{$this->thirdPartySettingKey})) { - throw new ConfigException('Third party settings storage should be an array.'); + throw new ThirdPartySettingsException('Third party settings storage should be an array.'); } } diff --git a/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsException.php b/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsException.php new file mode 100644 index 0000000..7320d81 --- /dev/null +++ b/core/lib/Drupal/Core/Config/Entity/ThirdPartySettingsException.php @@ -0,0 +1,15 @@ +