You are here

public function ItemInterface::checkAccess in Search API 8

Checks whether a user has permission to view this item.

Parameters

\Drupal\Core\Session\AccountInterface|null $account: (optional) The user session for which to check access, or NULL to check access for the current user.

Return value

bool TRUE if access is granted, FALSE otherwise.

Deprecated

in search_api:8.x-1.14 and is removed from search_api:2.0.0. Use getAccessResult() instead.

See also

https://www.drupal.org/node/3051902

1 method overrides ItemInterface::checkAccess()
Item::checkAccess in src/Item/Item.php
Checks whether a user has permission to view this item.

File

src/Item/ItemInterface.php, line 304

Class

ItemInterface
Represents a search item being indexed or returned as a search result.

Namespace

Drupal\search_api\Item

Code

public function checkAccess(AccountInterface $account = NULL);