public function SavedSearchType::isValidNotificationPlugin in Search API Saved Searches 8
Determines whether the given notification plugin ID is valid for this type.
The general contract of this method is that it should return TRUE if, and only if, a call to getNotificationPlugin() with the same ID would not result in an exception.
Parameters
string $notification_plugin_id: A notification plugin ID.
Return value
bool TRUE if the notification plugin with the given ID is enabled for this saved search type and can be loaded. FALSE otherwise.
Overrides SavedSearchTypeInterface::isValidNotificationPlugin
File
- src/
Entity/ SavedSearchType.php, line 341
Class
- SavedSearchType
- Provides an entity type for configuring how searches can be saved.
Namespace
Drupal\search_api_saved_searches\EntityCode
public function isValidNotificationPlugin($notification_plugin_id) {
$notification_plugins = $this
->getNotificationPlugins();
return !empty($notification_plugins[$notification_plugin_id]);
}