mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-10 00:34:58 +00:00
Feature: allow to administrate budget resources and charges from the admin
This commit is contained in:
@@ -39,6 +39,12 @@ class Charge extends AbstractElement implements HasCentersInterface
|
||||
self::HELP_NOT_RELEVANT,
|
||||
];
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=ChargeKind::class, inversedBy="AbstractElement")
|
||||
* @ORM\JoinColumn
|
||||
*/
|
||||
private ?ChargeKind $charge = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(name="help", type="string", nullable=true)
|
||||
@@ -66,6 +72,11 @@ class Charge extends AbstractElement implements HasCentersInterface
|
||||
return $this->getHousehold()->getCurrentPersons()->map(static fn (Person $p) => $p->getCenter())->toArray();
|
||||
}
|
||||
|
||||
public function getCharge(): ?ChargeKind
|
||||
{
|
||||
return $this->charge;
|
||||
}
|
||||
|
||||
public function getHelp()
|
||||
{
|
||||
return $this->help;
|
||||
@@ -91,6 +102,13 @@ class Charge extends AbstractElement implements HasCentersInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
public function setCharge(?ChargeKind $charge): self
|
||||
{
|
||||
$this->charge = $charge;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setHelp($help)
|
||||
{
|
||||
$this->help = $help;
|
||||
|
Reference in New Issue
Block a user