allow to restrict usage of global activities for projects (#3437)

This commit is contained in:
Kevin Papst
2022-07-23 01:17:24 +02:00
committed by GitHub
parent 8d695d03df
commit ed7f89cfe1
12 changed files with 140 additions and 11 deletions

View File

@@ -252,6 +252,15 @@ class Project implements EntityWithMetaFields, EntityWithBudget
* @ORM\Column(name="invoice_text", type="text", nullable=true)
*/
private $invoiceText;
/**
* Whether this project allows booking of global activities
*
* @var bool
*
* @ORM\Column(name="global_activities", type="boolean", nullable=false, options={"default": true})
* @Assert\NotNull()
*/
private $globalActivities = true;
public function __construct()
{
@@ -419,6 +428,16 @@ class Project implements EntityWithMetaFields, EntityWithBudget
return $this;
}
public function isGlobalActivities(): bool
{
return $this->globalActivities;
}
public function setGlobalActivities(bool $globalActivities): void
{
$this->globalActivities = $globalActivities;
}
/**
* @return Collection|MetaTableTypeInterface[]
*/