new/show/edit/delete/list functionality added for accompanyingperiod task

This commit is contained in:
2021-09-17 14:33:42 +02:00
parent 537518b66f
commit 6e3ce06fcf
15 changed files with 242 additions and 116 deletions

View File

@@ -248,11 +248,23 @@ abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
{
if ($this->getPerson() instanceof Person) {
return $this->getPerson()->getCenter();
} else {
return $this->getCourse()->getCenter();
}
return null;
}
public function getContext()
{
// if ($this->getCourse() instanceof AccompanyingPeriod){
// return $this->getCourse();
// } else {
// return $this->getPerson();
// }
return $this->getPerson() ?? $this->getCourse();
}
public function getScope(): ?\Chill\MainBundle\Entity\Scope
{