From 948df3506e99bb837332f5d0711cbbcdfaaa36ac Mon Sep 17 00:00:00 2001 From: Awilum Date: Thu, 4 Jul 2019 23:59:25 +0300 Subject: [PATCH] Flextype Core: slugify options added --- flextype/dependencies.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flextype/dependencies.php b/flextype/dependencies.php index 87832ea0..98be1149 100644 --- a/flextype/dependencies.php +++ b/flextype/dependencies.php @@ -55,7 +55,12 @@ $flextype['emitter'] = function ($container) { * Add slugify service to Flextype container */ $flextype['slugify'] = function ($container) { - return new Slugify(['separator' => '-', 'lowercase' => true, 'trim' => true]); + return new Slugify(['separator' => $container['registry']->get('settings.slugify.separator'), + 'lowercase' => $container['registry']->get('settings.slugify.lowercase'), + 'trim' => $container['registry']->get('settings.slugify.trim'), + 'regexp' => $container['registry']->get('settings.slugify.regexp'), + 'lowercase_after_regexp' => $container['registry']->get('settings.slugify.lowercase_after_regexp'), + 'strip_tags' => $container['registry']->get('settings.slugify.strip_tags'),]); }; /**