braune-digital / redirect-bundle
Redirect bundle
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 10
Forks: 0
Open Issues: 0
Type:symfony-bundle
This package is auto-updated.
Last update: 2025-01-12 00:58:55 UTC
README
This Bundle allows you to persist redirects in Doctrine ORM. Additional Status codes (e.g.: temporary or permanent) can be used.
Installation
Download using composer:
composer require braune-digital/redirect-bundle "~1.1"
And enable the Bundle in your AppKernel:
public function registerBundles() { $bundles = array( ... new BrauneDigital\RedirectBundle\BrauneDigitalRedirectBundle(), ... );
Usage
Create a redirect
$manager = $container->get('braune_digital.redirect.manager'); # Get the RedirectManager $manager->create($oldPath, $redirectPath, $statusCode); # Create a redirect
Update a redirect
You may update a redirect by directly accessing the Redirect Repository (BrauneDigitalRedirectBundle:Redirect)