mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-05 08:26:13 +00:00
Introduced a new interface ChillUrlGeneratorInterface for URL generation with return path handling. Implemented this interface in the ChillUrlGenerator class, which uses Symfony components to manage URL generation and request information.
36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Chill\MainBundle\Routing;
|
|
|
|
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
|
|
|
/**
|
|
* Interface for generating URLs with returnPath information.
|
|
*/
|
|
interface ChillUrlGeneratorInterface
|
|
{
|
|
/**
|
|
* Generate an URL without any return path. This is the same as using @see{UrlGeneratorInterface::generate}.
|
|
*/
|
|
public function generate(string $name, array $parameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string;
|
|
|
|
/**
|
|
* Generate an url, append a return path in it.
|
|
*/
|
|
public function generateWithReturnPath(string $name, array $parameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string;
|
|
|
|
/**
|
|
* Get the return path or, if any, generate an url.
|
|
*/
|
|
public function returnPathOr(string $name, array $parameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string;
|
|
}
|