public function EntityConstraintViolationListInterface::filterByFieldAccess

public EntityConstraintViolationListInterface::filterByFieldAccess(AccountInterface $account = NULL)

Filters this violation list to apply for accessible fields only.

Violations for inaccessible fields are removed so the returned object just has the remaining violations.

Parameters

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

Return value

$this

File

core/lib/Drupal/Core/Entity/EntityConstraintViolationListInterface.php, line 77

Class

EntityConstraintViolationListInterface
Interface for the result of entity validation.

Namespace

Drupal\Core\Entity

Code

public function filterByFieldAccess(AccountInterface $account = NULL);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityConstraintViolationListInterface.php/function/EntityConstraintViolationListInterface::filterByFieldAccess/8.1.x