Source: https://github.com/ezsystems/ezplatform-com/blob/master/src/AppBundle/Controller/HomeController.php