core-bundle/src/Resources/contao/classes/Messages.php
public function maintenanceCheck()
	{
		$this->import(BackendUser::class, 'User');

		if (!$this->User->hasAccess('maintenance', 'modules'))
		{
			return '';
		}

		try
		{
			if (System::getContainer()->get('lexik_maintenance.driver.factory')->getDriver()->isExists())
			{
				return '<p class="tl_error">' . $GLOBALS['TL_LANG']['MSC']['maintenanceEnabled'] . '</p>';
			}
		}
		catch (\Exception $e)
		{
			// ignore
		}

		return '';
	}
public function maintenanceCheck()
	{
		$this->import(BackendUser::class, 'User');

		if (!$this->User->hasAccess('maintenance', 'modules'))
		{
			return '';
		}

		try
		{
			if (System::getContainer()->get('lexik_maintenance.driver.factory')->getDriver()->isExists())
			{
				return '<p class="tl_error">' . $GLOBALS['TL_LANG']['MSC']['maintenanceEnabled'] . '</p>';
			}
		}
		catch (\Exception $e)
		{
			// ignore
		}

		return '';
	}
public function maintenanceCheck ( ) { $ this -> import ( BackendUser :: class , 'User' ) ; if ( ! $ this -> User -> hasAccess ( 'maintenance' , 'modules' ) ) { return '' ; } try { if ( System :: getContainer ( ) -> get ( 'lexik_maintenance.driver.factory' ) -> getDriver ( ) -> isExists ( ) ) { return '<p class="tl_error">' . $ GLOBALS [ 'TL_LANG' ] [ 'MSC' ] [ 'maintenanceEnabled' ] . '</p>' ; } } catch ( \ Exception $ e ) { // ignore } return '' ; }
Check for maintenance mode

@return string
Check for maintenance mode