mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 11:54:32 +02:00
Refactored TwigExtensions Part 1
This commit is contained in:
parent
8e6300079a
commit
b078389381
21 changed files with 301 additions and 89 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue