function PluginSettingsBase::unsetThirdPartySetting

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/PluginSettingsBase.php \Drupal\Core\Field\PluginSettingsBase::unsetThirdPartySetting()
  2. 10 core/lib/Drupal/Core/Field/PluginSettingsBase.php \Drupal\Core\Field\PluginSettingsBase::unsetThirdPartySetting()
  3. 11.x core/lib/Drupal/Core/Field/PluginSettingsBase.php \Drupal\Core\Field\PluginSettingsBase::unsetThirdPartySetting()

Overrides ThirdPartySettingsInterface::unsetThirdPartySetting

File

core/lib/Drupal/Core/Field/PluginSettingsBase.php, line 120

Class

PluginSettingsBase
Base class for the Field API plugins.

Namespace

Drupal\Core\Field

Code

public function unsetThirdPartySetting($module, $key) {
    unset($this->thirdPartySettings[$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->thirdPartySettings[$module])) {
        unset($this->thirdPartySettings[$module]);
    }
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.