public function ExternalSettingsJsController::access in External Links 8
Checks access external extlink JS file.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'ExternalSettingsJsController::access'
File
- src/
Controller/ ExternalSettingsJsController.php, line 63
Class
- ExternalSettingsJsController
- Provides an external endpoint from which extlink settings JS can be loaded.
Namespace
Drupal\extlink\ControllerCode
public function access() {
// Access is strictly controlled by whether module is configured to use an
// external JS file.
$config = $this->configFactory
->get('extlink.settings');
return AccessResult::allowedIf($config
->get('extlink_use_external_js_file'))
->addCacheableDependency($config);
}