core-bundle/src/Resources/contao/controllers/BackendMain.php
public function run()
	{
		try
		{
			$version = PackageUtil::getVersion('contao/core-bundle');
		}
		catch (\OutOfBoundsException $e)
		{
			$version = PackageUtil::getVersion('contao/contao');
		}

		$this->Template = new BackendTemplate('be_main');
		$this->Template->version = $version;

		if (isset($GLOBALS['TL_LANG']['MSC']['version']))
		{
			$this->Template->version = $GLOBALS['TL_LANG']['MSC']['version'] . ' ' . $version;
		}

		$this->Template->main = '';

		// Ajax request
		if ($_POST && Environment::get('isAjaxRequest'))
		{
			$this->objAjax = new Ajax(Input::post('action'));
			$this->objAjax->executePreActions();
		}

		// Error
		if (Input::get('act') == 'error')
		{
			$this->Template->error = $GLOBALS['TL_LANG']['ERR']['general'];
			$this->Template->title = $GLOBALS['TL_LANG']['ERR']['general'];

			@trigger_error('Using act=error has been deprecated and will no longer work in Contao 5.0. Throw an exception instead.', E_USER_DEPRECATED);
		}
		// Welcome screen
		elseif (!Input::get('do') && !Input::get('act'))
		{
			$this->Template->main .= $this->welcomeScreen();
			$this->Template->title = $GLOBALS['TL_LANG']['MSC']['home'];
		}
		// Open a module
		elseif (Input::get('do'))
		{
			$picker = null;

			if (isset($_GET['picker']))
			{
				$picker = System::getContainer()->get('contao.picker.builder')->createFromData(Input::get('picker', true));

				if ($picker !== null)
				{
					if (($menu = $picker->getMenu()) && $menu->count() > 1)
					{
						$this->Template->pickerMenu = System::getContainer()->get('contao.menu.renderer')->render($menu);
					}
				}
			}

			$this->Template->main .= $this->getBackendModule(Input::get('do'), $picker);
			$this->Template->title = $this->Template->headline;
		}

		return $this->output();
	}
public function run()
	{
		try
		{
			$version = PackageUtil::getVersion('contao/core-bundle');
		}
		catch (\OutOfBoundsException $e)
		{
			$version = PackageUtil::getVersion('contao/contao');
		}

		$this->Template = new BackendTemplate('be_main');
		$this->Template->version = $version;

		if (isset($GLOBALS['TL_LANG']['MSC']['version']))
		{
			$this->Template->version = $GLOBALS['TL_LANG']['MSC']['version'] . ' ' . $version;
		}

		$this->Template->main = '';

		// Ajax request
		if ($_POST && Environment::get('isAjaxRequest'))
		{
			$this->objAjax = new Ajax(Input::post('action'));
			$this->objAjax->executePreActions();
		}

		// Error
		if (Input::get('act') == 'error')
		{
			$this->Template->error = $GLOBALS['TL_LANG']['ERR']['general'];
			$this->Template->title = $GLOBALS['TL_LANG']['ERR']['general'];

			@trigger_error('Using act=error has been deprecated and will no longer work in Contao 5.0. Throw an exception instead.', E_USER_DEPRECATED);
		}
		// Welcome screen
		elseif (!Input::get('do') && !Input::get('act'))
		{
			$this->Template->main .= $this->welcomeScreen();
			$this->Template->title = $GLOBALS['TL_LANG']['MSC']['home'];
		}
		// Open a module
		elseif (Input::get('do'))
		{
			$picker = null;

			if (isset($_GET['picker']))
			{
				$picker = System::getContainer()->get('contao.picker.builder')->createFromData(Input::get('picker', true));

				if ($picker !== null)
				{
					if (($menu = $picker->getMenu()) && $menu->count() > 1)
					{
						$this->Template->pickerMenu = System::getContainer()->get('contao.menu.renderer')->render($menu);
					}
				}
			}

			$this->Template->main .= $this->getBackendModule(Input::get('do'), $picker);
			$this->Template->title = $this->Template->headline;
		}

		return $this->output();
	}
public function run ( ) { try { $ version = PackageUtil :: getVersion ( 'contao/core-bundle' ) ; } catch ( \ OutOfBoundsException $ e ) { $ version = PackageUtil :: getVersion ( 'contao/contao' ) ; } $ this -> Template = new BackendTemplate ( 'be_main' ) ; $ this -> Template -> version = $ version ; if ( isset ( $ GLOBALS [ 'TL_LANG' ] [ 'MSC' ] [ 'version' ] ) ) { $ this -> Template -> version = $ GLOBALS [ 'TL_LANG' ] [ 'MSC' ] [ 'version' ] . ' ' . $ version ; } $ this -> Template -> main = '' ; // Ajax request if ( $ _POST && Environment :: get ( 'isAjaxRequest' ) ) { $ this -> objAjax = new Ajax ( Input :: post ( 'action' ) ) ; $ this -> objAjax -> executePreActions ( ) ; } // Error if ( Input :: get ( 'act' ) == 'error' ) { $ this -> Template -> error = $ GLOBALS [ 'TL_LANG' ] [ 'ERR' ] [ 'general' ] ; $ this -> Template -> title = $ GLOBALS [ 'TL_LANG' ] [ 'ERR' ] [ 'general' ] ; @ trigger_error ( 'Using act=error has been deprecated and will no longer work in Contao 5.0. Throw an exception instead.' , E_USER_DEPRECATED ) ; } // Welcome screen elseif ( ! Input :: get ( 'do' ) && ! Input :: get ( 'act' ) ) { $ this -> Template -> main .= $ this -> welcomeScreen ( ) ; $ this -> Template -> title = $ GLOBALS [ 'TL_LANG' ] [ 'MSC' ] [ 'home' ] ; } // Open a module elseif ( Input :: get ( 'do' ) ) { $ picker = null ; if ( isset ( $ _GET [ 'picker' ] ) ) { $ picker = System :: getContainer ( ) -> get ( 'contao.picker.builder' ) -> createFromData ( Input :: get ( 'picker' , true ) ) ; if ( $ picker !== null ) { if ( ( $ menu = $ picker -> getMenu ( ) ) && $ menu -> count ( ) > 1 ) { $ this -> Template -> pickerMenu = System :: getContainer ( ) -> get ( 'contao.menu.renderer' ) -> render ( $ menu ) ; } } } $ this -> Template -> main .= $ this -> getBackendModule ( Input :: get ( 'do' ) , $ picker ) ; $ this -> Template -> title = $ this -> Template -> headline ; } return $ this -> output ( ) ; }
Run the controller and parse the login template

@return Response
Run the controller and parse the login template