mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'master' into accompanying_period_voter
This commit is contained in:
commit
e40b1b9853
@ -16,6 +16,8 @@ use Chill\EventBundle\Entity\Event;
|
||||
use Chill\EventBundle\Entity\Participation;
|
||||
use Chill\EventBundle\Form\ParticipationType;
|
||||
use Chill\EventBundle\Security\Authorization\ParticipationVoter;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\ReadableCollection;
|
||||
use LogicException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use RuntimeException;
|
||||
@ -509,7 +511,7 @@ class ParticipationController extends AbstractController
|
||||
/**
|
||||
* @return \Symfony\Component\Form\FormInterface
|
||||
*/
|
||||
protected function createEditFormMultiple(ArrayIterator $participations, Event $event)
|
||||
protected function createEditFormMultiple(Collection $participations, Event $event)
|
||||
{
|
||||
$form = $this->createForm(
|
||||
\Symfony\Component\Form\Extension\Core\Type\FormType::class,
|
||||
@ -638,6 +640,7 @@ class ParticipationController extends AbstractController
|
||||
$ignoredParticipations = $newParticipations = [];
|
||||
|
||||
foreach ($participations as $participation) {
|
||||
/** @var Participation $participation */
|
||||
// check for authorization
|
||||
$this->denyAccessUnlessGranted(
|
||||
ParticipationVoter::CREATE,
|
||||
|
@ -160,11 +160,11 @@ class Event implements HasCenterInterface, HasScopeInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ArrayIterator|Collection|Traversable
|
||||
* @return Collection<Participation>
|
||||
*/
|
||||
public function getParticipations()
|
||||
{
|
||||
return $this->getParticipationsOrdered();
|
||||
return new ArrayCollection(iterator_to_array($this->getParticipationsOrdered()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user