function Section::unsetThirdPartySetting

Same name in other branches
  1. 8.9.x 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()
  3. 11.x core/modules/layout_builder/src/Section.php \Drupal\layout_builder\Section::unsetThirdPartySetting()

Overrides ThirdPartySettingsInterface::unsetThirdPartySetting

File

core/modules/layout_builder/src/Section.php, line 427

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;
}

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