public function DynamicLayoutController::access in Dynamic Layouts 8
Checks access to add a new layout.
1 string reference to 'DynamicLayoutController::access'
File
- src/
Controller/ DynamicLayoutController.php, line 71
Class
- DynamicLayoutController
- DynamicLayoutController class.
Namespace
Drupal\dynamic_layouts\ControllerCode
public function access() {
$settings_created = FALSE;
/** @var \Drupal\dynamic_layouts\DynamicLayoutSettingsInterface $settings */
if (($settings = $this->entityTypeManager
->getStorage('dynamic_layout_settings')
->load('settings')) && $settings
->getFrontendLibrary()) {
$settings_created = TRUE;
}
return AccessResult::allowedIf($settings_created);
}