mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 02:14:31 +02:00
Use enum for manufacturing status
This commit is contained in:
parent
6336b38cfc
commit
9e3cb4d694
7 changed files with 88 additions and 30 deletions
|
@ -55,6 +55,7 @@ final class TwigCoreExtension extends AbstractExtension
|
|||
new TwigTest('instanceof', static fn($var, $instance) => $var instanceof $instance),
|
||||
/* Checks if a given variable is an object. E.g. `x is object` */
|
||||
new TwigTest('object', static fn($var): bool => is_object($var)),
|
||||
new TwigTest('enum', fn($var) => $var instanceof \UnitEnum),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue