You are here

interface NotificationPluginManagerInterface in Search API Saved Searches 8

Provides an interface for the notification plugin manager.

Hierarchy

Expanded class hierarchy of NotificationPluginManagerInterface

All classes that implement NotificationPluginManagerInterface

1 file declares its use of NotificationPluginManagerInterface
SavedSearchTypeForm.php in src/Form/SavedSearchTypeForm.php

File

src/Notification/NotificationPluginManagerInterface.php, line 11

Namespace

Drupal\search_api_saved_searches\Notification
View source
interface NotificationPluginManagerInterface extends PluginManagerInterface {

  /**
   * Creates a notification plugin for the given saved search type.
   *
   * @param \Drupal\search_api_saved_searches\SavedSearchTypeInterface $type
   *   The saved search type.
   * @param string $plugin_id
   *   The ID of the notification plugin to create.
   * @param array $configuration
   *   (optional) The configuration to set for the plugin.
   *
   * @return \Drupal\search_api_saved_searches\Notification\NotificationPluginInterface
   *   The created notification plugin.
   *
   * @throws \Drupal\search_api_saved_searches\SavedSearchesException
   *   Thrown if an unknown plugin ID is given.
   */
  public function createPlugin(SavedSearchTypeInterface $type, $plugin_id, array $configuration = []);

  /**
   * Creates multiple notification plugins for the given saved search type.
   *
   * @param \Drupal\search_api_saved_searches\SavedSearchTypeInterface $type
   *   The saved search type.
   * @param string[]|null $plugin_ids
   *   (optional) The IDs of the plugins to create, or NULL to create instances
   *   for all known notification plugins.
   * @param array $configurations
   *   (optional) The configurations to set for the plugins, keyed by plugin ID.
   *   Missing configurations are either taken from the saved search type's
   *   stored settings, if they are present there, or default to an empty array.
   *
   * @return \Drupal\search_api_saved_searches\Notification\NotificationPluginInterface[]
   *   The created notification plugins.
   *
   * @throws \Drupal\search_api_saved_searches\SavedSearchesException
   *   Thrown if an unknown plugin ID is given.
   */
  public function createPlugins(SavedSearchTypeInterface $type, array $plugin_ids = NULL, array $configurations = []);

}

Members

Namesort descending Modifiers Type Description Overrides
DiscoveryInterface::getDefinition public function Gets a specific plugin definition. 4
DiscoveryInterface::getDefinitions public function Gets the definition of all plugins for this type. 3
DiscoveryInterface::hasDefinition public function Indicates if a specific plugin definition exists. 2
FactoryInterface::createInstance public function Creates a pre-configured instance of a plugin. 7
MapperInterface::getInstance public function Gets a preconfigured instance of a plugin. 4
NotificationPluginManagerInterface::createPlugin public function Creates a notification plugin for the given saved search type. 1
NotificationPluginManagerInterface::createPlugins public function Creates multiple notification plugins for the given saved search type. 1