Refactored TwigExtensions Part 1

This commit is contained in:
Jan Böhmer 2022-09-18 16:45:12 +02:00
parent 8e6300079a
commit b078389381
21 changed files with 301 additions and 89 deletions

View file

@ -96,12 +96,12 @@ class EntityURLGenerator
* @param mixed $entity The element for which the page should be generated
* @param string $type The page type. Currently supported: 'info', 'edit', 'create', 'clone', 'list'/'list_parts'
*
* @return string|null the link to the desired page
* @return string the link to the desired page
*
* @throws EntityNotSupportedException thrown if the entity is not supported for the given type
* @throws InvalidArgumentException thrown if the givent type is not existing
*/
public function getURL($entity, string $type): ?string
public function getURL($entity, string $type): string
{
switch ($type) {
case 'info':