You are here

public function Section::unsetThirdPartySetting in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/src/Section.php \Drupal\layout_builder\Section::unsetThirdPartySetting()
  2. 10 core/modules/layout_builder/src/Section.php \Drupal\layout_builder\Section::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/modules/layout_builder/src/Section.php, line 408

Class

Section
Provides a domain object for layout sections.

Namespace

Drupal\layout_builder

Code

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

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