You are here

public function SavedSearchType::removeNotificationPlugin in Search API Saved Searches 8

Removes a notification plugin from this saved search type.

Parameters

string $notification_plugin_id: The ID of the notification plugin to remove.

Return value

$this

Overrides SavedSearchTypeInterface::removeNotificationPlugin

File

src/Entity/SavedSearchType.php, line 377

Class

SavedSearchType
Provides an entity type for configuring how searches can be saved.

Namespace

Drupal\search_api_saved_searches\Entity

Code

public function removeNotificationPlugin($notification_plugin_id) {

  // Make sure the notificationPluginInstances are loaded before trying to
  // remove a plugin from them.
  if ($this->notificationPluginInstances === NULL) {
    $this
      ->getNotificationPlugins();
  }
  unset($this->notificationPluginInstances[$notification_plugin_id]);
  return $this;
}