mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 02:14:31 +02:00
Use enums for LabelOptions
This commit is contained in:
parent
485b35fbd4
commit
71cd4057a7
23 changed files with 329 additions and 157 deletions
|
@ -49,6 +49,7 @@ use App\Entity\Base\AbstractStructuralDBElement;
|
|||
use App\Entity\Contracts\NamedElementInterface;
|
||||
use App\Entity\Contracts\TimeStampableInterface;
|
||||
use App\Entity\LabelSystem\LabelOptions;
|
||||
use App\Entity\LabelSystem\LabelProcessMode;
|
||||
use App\Entity\Parameters\AbstractParameter;
|
||||
use App\Entity\Parts\MeasurementUnit;
|
||||
use App\Entity\Parts\Part;
|
||||
|
@ -123,7 +124,7 @@ final class SandboxedTwigProvider
|
|||
|
||||
public function getTwig(LabelOptions $options): Environment
|
||||
{
|
||||
if ('twig' !== $options->getLinesMode()) {
|
||||
if (LabelProcessMode::TWIG !== $options->getProcessMode()) {
|
||||
throw new InvalidArgumentException('The LabelOptions must explicitly allow twig via lines_mode = "twig"!');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue