You are here

public function SavedSearchTypeStorage::getTypesForNotificationPlugin in Search API Saved Searches 8

Retrieves the IDs of all types that use a specific notification plugin.

Parameters

string $plugin_id: The notification plugin's ID.

Return value

string[] The IDs of all types that use the given notification plugin.

File

src/Entity/SavedSearchTypeStorage.php, line 23

Class

SavedSearchTypeStorage
Provides a storage handler for saved search types.

Namespace

Drupal\search_api_saved_searches\Entity

Code

public function getTypesForNotificationPlugin($plugin_id) {
  return $this
    ->getQuery()
    ->exists("notification_settings.{$plugin_id}")
    ->accessCheck(FALSE)
    ->execute();
}