You are here

public function PluginSelectorBase::setKeepPreviouslySelectedPlugins in Plugin 8.2

Sets whether previously selected plugins must be kept.

Parameters

bool $keep:

Return value

$this

Overrides PluginSelectorInterface::setKeepPreviouslySelectedPlugins

See also

self::getPreviouslySelectedPlugins()

File

src/Plugin/Plugin/PluginSelector/PluginSelectorBase.php, line 195

Class

PluginSelectorBase
Provides a base plugin selector.

Namespace

Drupal\plugin\Plugin\Plugin\PluginSelector

Code

public function setKeepPreviouslySelectedPlugins($keep = TRUE) {
  $this->configuration['keep_previously_selected_plugins'] = $keep;
  if ($keep === FALSE) {
    $this
      ->setPreviouslySelectedPlugins([]);
  }
  return $this;
}