public function PanelsDisplayVariant::access in Panels 8.4
Same name and namespace in other branches
- 8.3 src/Plugin/DisplayVariant/PanelsDisplayVariant.php \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant::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.
Overrides VariantBase::access
File
- src/
Plugin/ DisplayVariant/ PanelsDisplayVariant.php, line 380
Class
- PanelsDisplayVariant
- Provides a display variant that simply contains blocks.
Namespace
Drupal\panels\Plugin\DisplayVariantCode
public function access(AccountInterface $account = NULL) {
// If no blocks are configured for this variant, deny access.
if (empty($this->configuration['blocks'])) {
return FALSE;
}
return parent::access($account);
}