API methods to handle teams and users (#1384)
This commit is contained in:
@@ -144,6 +144,11 @@ class Team
|
||||
return $this->users;
|
||||
}
|
||||
|
||||
public function hasCustomer(Customer $customer): bool
|
||||
{
|
||||
return $this->customers->contains($customer);
|
||||
}
|
||||
|
||||
public function addCustomer(Customer $customer)
|
||||
{
|
||||
if ($this->customers->contains($customer)) {
|
||||
@@ -172,6 +177,11 @@ class Team
|
||||
return $this->customers;
|
||||
}
|
||||
|
||||
public function hasProject(Project $project): bool
|
||||
{
|
||||
return $this->projects->contains($project);
|
||||
}
|
||||
|
||||
public function addProject(Project $project)
|
||||
{
|
||||
if ($this->projects->contains($project)) {
|
||||
|
||||
Reference in New Issue
Block a user