allow to restrict usage of global activities for projects (#3437)
This commit is contained in:
@@ -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[]
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user