Exemple #1
0
 public function addOwner(UserId $userId)
 {
     if (!$this->isOwner($userId) && $this->isOrganizationMember($userId)) {
         $this->removeOrganizationMember($userId);
     }
     $owner = new Owner(OwnerId::generate(), $userId, $this);
     $this->owners->add($owner);
     $this->updatedOn = new \DateTimeImmutable();
     $this->publish(new OwnerAdded($owner->id(), $userId, $this->id));
 }
Exemple #2
0
 public function convertToPHPValue($value, AbstractPlatform $platform) : OwnerId
 {
     return OwnerId::generate($value);
 }