interface NotificationPluginInterface in Search API Saved Searches 8
Provides an interface for notification plugins.
Hierarchy
- interface \Drupal\search_api\Plugin\HideablePluginInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface; interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- interface \Drupal\search_api\Plugin\ConfigurablePluginInterface
- interface \Drupal\search_api_saved_searches\Notification\NotificationPluginInterface
- interface \Drupal\search_api\Plugin\ConfigurablePluginInterface
Expanded class hierarchy of NotificationPluginInterface
All classes that implement NotificationPluginInterface
See also
\Drupal\search_api_saved_searches\Annotation\SearchApiSavedSearchesNotification
\Drupal\search_api_saved_searches\Notification\NotificationPluginManager
\Drupal\search_api_saved_searches\Notification\NotificationPluginBase
2 files declare their use of NotificationPluginInterface
- SavedSearchType.php in src/
Entity/ SavedSearchType.php - SavedSearchTypeInterface.php in src/
SavedSearchTypeInterface.php
File
- src/
Notification/ NotificationPluginInterface.php, line 21
Namespace
Drupal\search_api_saved_searches\NotificationView source
interface NotificationPluginInterface extends ConfigurablePluginInterface {
/**
* Retrieves the saved search type.
*
* @return \Drupal\search_api_saved_searches\SavedSearchTypeInterface
* The saved search type to which this plugin is attached.
*/
public function getSavedSearchType();
/**
* Sets the saved search type.
*
* @param \Drupal\search_api_saved_searches\SavedSearchTypeInterface $type
* The new saved search type for this plugin.
*
* @return $this
*/
public function setSavedSearchType(SavedSearchTypeInterface $type);
/**
* Retrieves the field definitions to add to saved searches for this plugin.
*
* The field definitions will be added to all bundles for which this
* notification plugin is active.
*
* If an existing plugin's field definitions change in any way, it is the
* providing module's responsibility to provide an update hook calling field
* storage definition listener's CRUD methods as appropriate.
*
* @return \Drupal\search_api_saved_searches\BundleFieldDefinition[]
* An array of bundle field definitions, keyed by field name.
*/
public function getFieldDefinitions();
/**
* Retrieves default form display settings for the plugin's custom fields.
*
* @return array
* An associative array of form display settings, keyed by field names
* defined by this plugin. Fields can easily be hidden by default by just
* omitting them from this array.
*/
public function getDefaultFieldFormDisplay();
/**
* Checks access to an operation on a given entity field.
*
* This method will only be called for fields defined by this plugin and can
* be used to implement custom access restrictions for those fields.
*
* @param string $operation
* The operation access should be checked for.
* Usually one of "view" or "edit".
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition.
* @param \Drupal\Core\Session\AccountInterface $account
* The user session for which to check access.
* @param \Drupal\Core\Field\FieldItemListInterface $items
* (optional) The field values for which to check access, or NULL if access
* is checked for the field definition, without any specific value
* available.
*
* @return \Drupal\Core\Access\AccessResultInterface
* The access result.
*
* @see \Drupal\search_api_saved_searches\Entity\SavedSearchAccessControlHandler::checkFieldAccess()
*/
public function checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL);
/**
* Notifies the search's owner of new results.
*
* @param \Drupal\search_api_saved_searches\SavedSearchInterface $search
* The saved search for which to report new results.
* @param \Drupal\search_api\Query\ResultSetInterface $results
* The new results.
*/
public function notify(SavedSearchInterface $search, ResultSetInterface $results);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
ConfigurablePluginInterface:: |
public | function | Returns the plugin's description. | 1 |
ConfigurablePluginInterface:: |
public | function | Returns the label for use on the administration pages. | 1 |
ConfigurablePluginInterface:: |
public | function | Informs the plugin that some of its dependencies are being removed. | 1 |
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 112 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
HideablePluginInterface:: |
public | function | Determines whether this plugin should be hidden in the UI. | 1 |
NotificationPluginInterface:: |
public | function | Checks access to an operation on a given entity field. | 1 |
NotificationPluginInterface:: |
public | function | Retrieves default form display settings for the plugin's custom fields. | 1 |
NotificationPluginInterface:: |
public | function | Retrieves the field definitions to add to saved searches for this plugin. | 1 |
NotificationPluginInterface:: |
public | function | Retrieves the saved search type. | 1 |
NotificationPluginInterface:: |
public | function | Notifies the search's owner of new results. | 1 |
NotificationPluginInterface:: |
public | function | Sets the saved search type. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |