mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-22 11:21:31 +00:00
Renamed Storelocation entity to StorageLocation
This commit is contained in:
parent
09acca950d
commit
0af5a58dbe
59 changed files with 218 additions and 176 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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() : '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue