Added possibility to generate labels for storelocations.

This commit is contained in:
Jan Böhmer 2020-05-08 13:49:44 +02:00
parent 9a9cd8e887
commit bd6a0de0a2
12 changed files with 126 additions and 4 deletions

View file

@ -37,11 +37,28 @@ class BarcodeExampleElementsGenerator
return $this->getExamplePart();
case 'part_lot':
return $this->getExamplePartLot();
case 'storelocation':
return $this->getStorelocation();
default:
throw new \InvalidArgumentException('Unknown $type.');
}
}
protected function getStorelocation(): Storelocation
{
$storelocation = new Storelocation();
$storelocation->setName('Location 1');
$storelocation->setComment('Example comment');
$storelocation->updatedTimestamps();
$parent = new Storelocation();
$parent->setName('Parent');
$storelocation->setParent($parent);
return $storelocation;
}
protected function getStructuralData(string $class): AbstractStructuralDBElement
{
if (!is_a($class, AbstractStructuralDBElement::class, true)) {