You are here

public function NotificationPluginBase::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.

Overrides NotificationPluginInterface::checkFieldAccess

See also

\Drupal\search_api_saved_searches\Entity\SavedSearchAccessControlHandler::checkFieldAccess()

1 call to NotificationPluginBase::checkFieldAccess()
Email::checkFieldAccess in src/Plugin/search_api_saved_searches/notification/Email.php
Checks access to an operation on a given entity field.
1 method overrides NotificationPluginBase::checkFieldAccess()
Email::checkFieldAccess in src/Plugin/search_api_saved_searches/notification/Email.php
Checks access to an operation on a given entity field.

File

src/Notification/NotificationPluginBase.php, line 91

Class

NotificationPluginBase
Defines a base class for notification plugins.

Namespace

Drupal\search_api_saved_searches\Notification

Code

public function checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) {
  return AccessResult::allowed();
}