configs: overwrite via prepend, mode instead of duration_only (#715)

This commit is contained in:
Kevin Papst
2019-04-26 16:14:28 +02:00
committed by GitHub
parent f0f757cf75
commit 32f0d80729
24 changed files with 253 additions and 45 deletions

View File

@@ -9,13 +9,15 @@
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as BaseAbstractController;
use Symfony\Component\Translation\DataCollectorTranslator;
use Symfony\Contracts\Service\ServiceSubscriberInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* The abstract base controller.
*/
abstract class AbstractController extends Controller
abstract class AbstractController extends BaseAbstractController implements ServiceSubscriberInterface
{
public const FLASH_SUCCESS = 'success';
public const FLASH_WARNING = 'warning';
@@ -89,4 +91,11 @@ abstract class AbstractController extends Controller
$this->addFlash($type, $message);
}
public static function getSubscribedServices()
{
return array_merge(parent::getSubscribedServices(), [
'translator' => TranslatorInterface::class
]);
}
}