function DirectWriteTest::onPreRequire

Event listener that records the maintenance mode flag on pre-require.

File

core/modules/package_manager/tests/src/Kernel/DirectWriteTest.php, line 100

Class

DirectWriteTest
Tests Direct Write.

Namespace

Drupal\Tests\package_manager\Kernel

Code

public function onPreRequire() : void {
  $this->preRequireMaintenanceMode = (bool) $this->container
    ->get(StateInterface::class)
    ->get('system.maintenance_mode');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.