public function NotificationPluginInterface::checkFieldAccess in Search API Saved Searches 8
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.
Parameters
string $operation: The operation access should be checked for. Usually one of "view" or "edit".
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.
\Drupal\Core\Session\AccountInterface $account: The user session for which to check access.
\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 value
\Drupal\Core\Access\AccessResultInterface The access result.
See also
\Drupal\search_api_saved_searches\Entity\SavedSearchAccessControlHandler::checkFieldAccess()
1 method overrides NotificationPluginInterface::checkFieldAccess()
- NotificationPluginBase::checkFieldAccess in src/
Notification/ NotificationPluginBase.php - Checks access to an operation on a given entity field.
File
- src/
Notification/ NotificationPluginInterface.php, line 89
Class
- NotificationPluginInterface
- Provides an interface for notification plugins.
Namespace
Drupal\search_api_saved_searches\NotificationCode
public function checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL);