public function DatasourceInterface::checkItemAccess in Search API 8
Checks whether a user has permission to view the given item.
Parameters
\Drupal\Core\TypedData\ComplexDataInterface $item: An item of this datasource's type.
\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 getItemAccessResult() instead.
See also
https://www.drupal.org/node/3051902
1 method overrides DatasourceInterface::checkItemAccess()
- DatasourcePluginBase::checkItemAccess in src/
Datasource/ DatasourcePluginBase.php - Checks whether a user has permission to view the given item.
File
- src/
Datasource/ DatasourceInterface.php, line 147
Class
- DatasourceInterface
- Describes a source for search items.
Namespace
Drupal\search_api\DatasourceCode
public function checkItemAccess(ComplexDataInterface $item, AccountInterface $account = NULL);