Skip to content

Commit

Permalink
Add filter config
Browse files Browse the repository at this point in the history
  • Loading branch information
loco8878 committed Nov 7, 2024
1 parent c86dc0f commit 714a400
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Bridge/Laminas/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Cocur\Slugify\Bridge\Laminas;

use Cocur\Slugify\Slugify;
use Laminas\ServiceManager\Factory\InvokableFactory;

class ConfigProvider
{
Expand All @@ -15,6 +16,7 @@ public function __invoke(): array
{
return [
'dependencies' => $this->getDependencyConfig(),
'filters' => $this->filterConfig(),
'view_helpers' => $this->getViewHelperConfig(),
];
}
Expand Down Expand Up @@ -52,4 +54,19 @@ public function getViewHelperConfig(): array
]
];
}

/**
* @return array
*/
private function filterConfig(): array
{
return [
'factories' => [
SlugifyFilter::class => InvokableFactory::class,
],
'aliases' => [
'slugify' => SlugifyFilter::class,
],
];
}
}

0 comments on commit 714a400

Please sign in to comment.