public function DatasourcePluginBase::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.
Overrides DatasourceInterface::getItemAccessResult
1 method overrides DatasourcePluginBase::getItemAccessResult()
- ContentEntity::getItemAccessResult in src/
Plugin/ search_api/ datasource/ ContentEntity.php - Checks whether a user has permission to view the given item.
File
- src/
Datasource/ DatasourcePluginBase.php, line 109
Class
- DatasourcePluginBase
- Defines a base class from which other datasources may extend.
Namespace
Drupal\search_api\DatasourceCode
public function getItemAccessResult(ComplexDataInterface $item, AccountInterface $account = NULL) {
return AccessResult::allowed();
}