function VariantInterface::access
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Display/VariantInterface.php \Drupal\Core\Display\VariantInterface::access()
- 10 core/lib/Drupal/Core/Display/VariantInterface.php \Drupal\Core\Display\VariantInterface::access()
- 11.x core/lib/Drupal/Core/Display/VariantInterface.php \Drupal\Core\Display\VariantInterface::access()
Determines if this display variant is accessible.
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
bool TRUE if this display variant is accessible, FALSE otherwise.
1 method overrides VariantInterface::access()
- VariantBase::access in core/
lib/ Drupal/ Core/ Display/ VariantBase.php - Determines if this display variant is accessible.
File
-
core/
lib/ Drupal/ Core/ Display/ VariantInterface.php, line 74
Class
- VariantInterface
- Provides an interface for DisplayVariant plugins.
Namespace
Drupal\Core\DisplayCode
public function access(AccountInterface $account = NULL);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.