fixed: voter and permissions in accompanying course document

This commit is contained in:
2022-07-11 12:55:02 +02:00
parent 3bb8b713d1
commit ab08dab88a
5 changed files with 36 additions and 33 deletions

View File

@@ -13,6 +13,7 @@ namespace Chill\DocStoreBundle\Entity;
use Chill\MainBundle\Entity\HasCenterInterface;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\Scope;
use Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM;
@@ -27,6 +28,13 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt
*/
private Person $person;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
*
* @var \Chill\MainBundle\Entity\Scope The document's center
*/
private $scope;
public function getCenter()
{
return $this->getPerson()->getCenter();
@@ -37,10 +45,22 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt
return $this->person;
}
public function getScope(): ?Scope
{
return $this->scope;
}
public function setPerson($person): self
{
$this->person = $person;
return $this;
}
public function setScope($scope): self
{
$this->scope = $scope;
return $this;
}
}