diff --git a/config/packages/mapping/ActivityEntity.orm.xml b/config/packages/mapping/ActivityEntity.orm.xml index 3f1baa3..7ffc421 100644 --- a/config/packages/mapping/ActivityEntity.orm.xml +++ b/config/packages/mapping/ActivityEntity.orm.xml @@ -6,8 +6,8 @@ - - + + diff --git a/config/packages/mapping/ActorEntity.orm.xml b/config/packages/mapping/ActorEntity.orm.xml index 825bfce..4361fcb 100644 --- a/config/packages/mapping/ActorEntity.orm.xml +++ b/config/packages/mapping/ActorEntity.orm.xml @@ -5,5 +5,6 @@ + \ No newline at end of file diff --git a/src/Entity/ActorEntity.php b/src/Entity/ActorEntity.php index 074a272..fa2da43 100644 --- a/src/Entity/ActorEntity.php +++ b/src/Entity/ActorEntity.php @@ -2,6 +2,7 @@ namespace App\Entity; use App\Helper\StringGenerationHelper; +use Doctrine\Common\Collections\ArrayCollection; /** * Entity for workspaces @@ -24,6 +25,17 @@ /** @var bool If the actor is still active, if set to false, he will not be proposed when setting and actor to a taks or activity */ protected $active = True; + /** @var ArrayCollection List of related activities */ + protected $activities = Null; + + /** + * Init entity + */ + public function __construct() + { + $this->activities = new ArrayCollection(); + } + /** * Get the unique ID the entity * @@ -143,7 +155,9 @@ } /** - * Get the display name of the actor. Equals nickname if set, Firstname LASTNAME else. + * Get the display name of the actor. + * Equals nickname if set, Firstname LASTNAME else. + * * @return string */ public function getDisplayName(): string @@ -173,4 +187,28 @@ return $this; } + + /** + * * + * Get the list of activities + * + * @return ArrayCollection + */ + public function getActivities(): ArrayCollection + { + return $this->activities; + } + + /** + * Set list of activities + * + * @param ArrayCollection $activities + * @return self + */ + public function setActivities(ArrayCollection $activities): self + { + $this->activities = $activities; + + return $this; + } } \ No newline at end of file