authorize_access_allowed example

\Drupal::moduleHandler()->addModule('system', 'core/modules/system');
\Drupal::moduleHandler()->addModule('user', 'core/modules/user');
\Drupal::moduleHandler()->load('system');
\Drupal::moduleHandler()->load('user');

// Initialize the maintenance theme for this administrative script. drupal_maintenance_theme();

$content = [];
$show_messages = TRUE;

$is_allowed = authorize_access_allowed($request);

// Build content. if ($is_allowed) {
  // Load both the Form API and Batch API.   require_once __DIR__ . '/includes/form.inc';
  require_once __DIR__ . '/includes/batch.inc';

  $page_title = $request->getSession()->get('authorize_page_title', t('Authorize file system changes'));

  // See if we've run the operation and need to display a report.   if ($results = $request->getSession()->remove('authorize_results')) {

    
Home | Imprint | This part of the site doesn't use cookies.