mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Fixed: [accompanying course document] fix access to accompanying course document
The entity AccompanyingCourseDocument didn't had any center associated with this entity. Implementing the interface `HasCenterInterface` fixed the problem. Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/83
This commit is contained in:
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\DocStoreBundle\Entity;
|
||||
|
||||
use Chill\MainBundle\Entity\HasCentersInterface;
|
||||
use Chill\MainBundle\Entity\HasScopesInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@@ -19,7 +20,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
* @ORM\Entity
|
||||
* @ORM\Table("chill_doc.accompanyingcourse_document")
|
||||
*/
|
||||
class AccompanyingCourseDocument extends Document implements HasScopesInterface
|
||||
class AccompanyingCourseDocument extends Document implements HasScopesInterface, HasCentersInterface
|
||||
{
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class)
|
||||
@@ -27,6 +28,11 @@ class AccompanyingCourseDocument extends Document implements HasScopesInterface
|
||||
*/
|
||||
private ?AccompanyingPeriod $course = null;
|
||||
|
||||
public function getCenters(): ?iterable
|
||||
{
|
||||
return $this->course->getCenters();
|
||||
}
|
||||
|
||||
public function getCourse(): ?AccompanyingPeriod
|
||||
{
|
||||
return $this->course;
|
||||
|
Reference in New Issue
Block a user