You are here

public function ConfigEntityBase::unsetThirdPartySetting in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php \Drupal\Core\Config\Entity\ConfigEntityBase::unsetThirdPartySetting()

Unsets a third-party setting.

Parameters

string $module: The module providing the third-party setting.

string $key: The setting name.

Return value

mixed The value.

Overrides ThirdPartySettingsInterface::unsetThirdPartySetting

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php, line 535
Contains \Drupal\Core\Config\Entity\ConfigEntityBase.

Class

ConfigEntityBase
Defines a base configuration entity class.

Namespace

Drupal\Core\Config\Entity

Code

public function unsetThirdPartySetting($module, $key) {
  unset($this->third_party_settings[$module][$key]);

  // If the third party is no longer storing any information, completely
  // remove the array holding the settings for this module.
  if (empty($this->third_party_settings[$module])) {
    unset($this->third_party_settings[$module]);
  }
  return $this;
}