Renamed Storelocation entity to StorageLocation

This commit is contained in:
Jan Böhmer 2023-09-04 22:57:40 +02:00
parent 09acca950d
commit 0af5a58dbe
59 changed files with 218 additions and 176 deletions

View file

@ -41,7 +41,7 @@ declare(strict_types=1);
namespace App\Services\LabelSystem\PlaceholderProviders;
use App\Entity\Parts\Storelocation;
use App\Entity\Parts\StorageLocation;
use App\Entity\UserSystem\User;
use App\Entity\Parts\PartLot;
use App\Services\Formatters\AmountFormatter;
@ -95,11 +95,11 @@ final class PartLotProvider implements PlaceholderProviderInterface
}
if ('[[LOCATION]]' === $placeholder) {
return $label_target->getStorageLocation() instanceof Storelocation ? $label_target->getStorageLocation()->getName() : '';
return $label_target->getStorageLocation() instanceof StorageLocation ? $label_target->getStorageLocation()->getName() : '';
}
if ('[[LOCATION_FULL]]' === $placeholder) {
return $label_target->getStorageLocation() instanceof Storelocation ? $label_target->getStorageLocation()->getFullPath() : '';
return $label_target->getStorageLocation() instanceof StorageLocation ? $label_target->getStorageLocation()->getFullPath() : '';
}
if ('[[OWNER]]' === $placeholder) {

View file

@ -23,13 +23,13 @@ declare(strict_types=1);
namespace App\Services\LabelSystem\PlaceholderProviders;
use App\Entity\UserSystem\User;
use App\Entity\Parts\Storelocation;
use App\Entity\Parts\StorageLocation;
class StorelocationProvider implements PlaceholderProviderInterface
{
public function replace(string $placeholder, object $label_target, array $options = []): ?string
{
if ($label_target instanceof Storelocation) {
if ($label_target instanceof StorageLocation) {
if ('[[OWNER]]' === $placeholder) {
return $label_target->getOwner() instanceof User ? $label_target->getOwner()->getFullName() : '';
}