You are here

public function DatasourceInterface::getItemAccessResult 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

\Drupal\Core\Access\AccessResultInterface The access result.

1 method overrides DatasourceInterface::getItemAccessResult()
DatasourcePluginBase::getItemAccessResult in src/Datasource/DatasourcePluginBase.php
Checks whether a user has permission to view the given item.

File

src/Datasource/DatasourceInterface.php, line 161

Class

DatasourceInterface
Describes a source for search items.

Namespace

Drupal\search_api\Datasource

Code

public function getItemAccessResult(ComplexDataInterface $item, AccountInterface $account = NULL);