mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
configure SocialIssue consistency on Activity and AccompanyingPeriod
This commit is contained in:
@@ -23,6 +23,7 @@ namespace Chill\ActivityBundle\Entity;
|
||||
use Chill\DocStoreBundle\Entity\Document;
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
|
||||
use Chill\PersonBundle\AccompanyingPeriod\SocialIssueConsistency\AccompanyingPeriodLinkedWithSocialIssuesEntityInterface;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
|
||||
@@ -60,7 +61,7 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
* path="scope")
|
||||
*/
|
||||
|
||||
class Activity implements HasCenterInterface, HasScopeInterface
|
||||
class Activity implements HasCenterInterface, HasScopeInterface, AccompanyingPeriodLinkedWithSocialIssuesEntityInterface
|
||||
{
|
||||
const SENTRECEIVED_SENT = 'sent';
|
||||
const SENTRECEIVED_RECEIVED = 'received';
|
||||
@@ -417,7 +418,7 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
return $this->persons;
|
||||
}
|
||||
|
||||
public function getPersonsAssociated(): array
|
||||
public function getPersonsAssociated(): array
|
||||
{
|
||||
if (null !== $this->accompanyingPeriod) {
|
||||
$personsAssociated = [];
|
||||
@@ -426,11 +427,11 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
$personsAssociated[] = $participation->getPerson();
|
||||
}
|
||||
}
|
||||
return $personsAssociated;
|
||||
return $personsAssociated;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
public function getPersonsNotAssociated(): array
|
||||
{
|
||||
if (null !== $this->accompanyingPeriod) {
|
||||
@@ -443,7 +444,7 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
return $personsNotAssociated;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
public function setPersons(?Collection $persons): self
|
||||
{
|
||||
|
Reference in New Issue
Block a user