diff --git a/module/Common/src/Template/Extension/TranslatorExtension.php b/module/Common/src/Template/Extension/TranslatorExtension.php index 477730f2..775bd909 100644 --- a/module/Common/src/Template/Extension/TranslatorExtension.php +++ b/module/Common/src/Template/Extension/TranslatorExtension.php @@ -20,5 +20,6 @@ class TranslatorExtension implements ExtensionInterface public function register(Engine $engine): void { $engine->registerFunction('translate', [$this->translator, 'translate']); + $engine->registerFunction('locale', [$this->translator, 'getLocale']); } } diff --git a/module/Common/test/Template/Extension/TranslatorExtensionTest.php b/module/Common/test/Template/Extension/TranslatorExtensionTest.php index ab97b953..dd3462bc 100644 --- a/module/Common/test/Template/Extension/TranslatorExtensionTest.php +++ b/module/Common/test/Template/Extension/TranslatorExtensionTest.php @@ -25,11 +25,14 @@ class TranslatorExtensionTest extends TestCase public function properFunctionsAreReturned() { $engine = $this->prophesize(Engine::class); - $registerFunction = $engine->registerFunction('translate', Argument::type('callable'))->will(function () { + $registerTranslate = $engine->registerFunction('translate', Argument::type('callable'))->will(function () { + }); + $registerLocale = $engine->registerFunction('locale', Argument::type('array'))->will(function () { }); $this->extension->register($engine->reveal()); - $registerFunction->shouldHaveBeenCalledOnce(); + $registerTranslate->shouldHaveBeenCalledOnce(); + $registerLocale->shouldHaveBeenCalledOnce(); } } diff --git a/module/Core/templates/layout/default.phtml b/module/Core/templates/layout/default.phtml index 431c1d73..2a8dcd98 100644 --- a/module/Core/templates/layout/default.phtml +++ b/module/Core/templates/layout/default.phtml @@ -1,31 +1,32 @@ - - - <?= $this->section('title', '') ?> | URL shortener - - - - - - section('stylesheets', '') ?> - - -
-
- section('main', '') ?> -
-
- - - + + + diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 00000000..8157d0e0 Binary files /dev/null and b/public/favicon.ico differ