WIP
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\BusProNet\Model;
|
||||
|
||||
use Symfony\Component\Serializer\Annotation\Ignore;
|
||||
use Symfony\Component\Serializer\Annotation\SerializedName;
|
||||
|
||||
class CrmAttribute
|
||||
{
|
||||
#[SerializedName('@id')]
|
||||
private ?int $id = null;
|
||||
|
||||
#[SerializedName('@bezeichnung')]
|
||||
private ?string $label = null;
|
||||
|
||||
#[SerializedName('@auswahl')]
|
||||
private ?string $selectedAsString = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(?int $id): static
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLabel(): ?string
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
public function setLabel(?string $label): static
|
||||
{
|
||||
$this->label = $label;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSelectedAsString(): ?string
|
||||
{
|
||||
return $this->selectedAsString;
|
||||
}
|
||||
|
||||
public function setSelectedAsString(?string $selectedAsString): static
|
||||
{
|
||||
$this->selectedAsString = $selectedAsString;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isSelected(): bool
|
||||
{
|
||||
return 'true' === strtolower($this->selectedAsString);
|
||||
}
|
||||
|
||||
public function setSelected(bool $selected): static
|
||||
{
|
||||
$this->selectedAsString = $selected ? 'True' : 'False';
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user