public function DefaultAccess::access in Panelizer 8.5
Same name and namespace in other branches
- 8.3 src/Access/DefaultAccess.php \Drupal\panelizer\Access\DefaultAccess::access()
- 8.4 src/Access/DefaultAccess.php \Drupal\panelizer\Access\DefaultAccess::access()
Determines access to a default Panelizer layout.
Parameters
string $entity_type_id: The panelized entity type ID.
string $bundle: The panelized bundle ID.
string $view_mode_name: The panelized view mode ID.
Return value
\Drupal\Core\Access\AccessResult
File
- src/
Access/ DefaultAccess.php, line 43
Class
Namespace
Drupal\panelizer\AccessCode
public function access($entity_type_id, $bundle, $view_mode_name) {
$settings = $this->panelizer
->getPanelizerSettings($entity_type_id, $bundle, $view_mode_name);
return $settings['enable'] ? AccessResult::allowed() : AccessResult::forbidden();
}