mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
cs: Second part - ignore test/app
subdirectory.
This commit is contained in:
@@ -120,7 +120,7 @@ class EventController extends AbstractController
|
||||
$this->addFlash(
|
||||
'success',
|
||||
$this->get('translator')
|
||||
->trans('The event has been sucessfully removed')
|
||||
->trans('The event has been sucessfully removed')
|
||||
);
|
||||
|
||||
return $this->redirectToRoute('chill_main_search', [
|
||||
|
@@ -275,7 +275,7 @@ class ParticipationController extends AbstractController
|
||||
$this->addFlash(
|
||||
'success',
|
||||
$this->get('translator')
|
||||
->trans('The participation has been sucessfully removed')
|
||||
->trans('The participation has been sucessfully removed')
|
||||
);
|
||||
|
||||
return $this->redirectToRoute('chill_event__event_show', [
|
||||
@@ -551,8 +551,7 @@ class ParticipationController extends AbstractController
|
||||
Request $request,
|
||||
Participation $participation,
|
||||
bool $multiple = false
|
||||
)
|
||||
{
|
||||
) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
if ($em->contains($participation)) {
|
||||
@@ -653,8 +652,8 @@ class ParticipationController extends AbstractController
|
||||
$ignoredParticipations[] = $participation
|
||||
->getEvent()->getParticipations()->filter(
|
||||
function (Participation $p) use ($participation) {
|
||||
return $p->getPerson()->getId() === $participation->getPerson()->getId();
|
||||
}
|
||||
return $p->getPerson()->getId() === $participation->getPerson()->getId();
|
||||
}
|
||||
)->first();
|
||||
} else {
|
||||
$newParticipations[] = $participation;
|
||||
|
@@ -45,8 +45,8 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa
|
||||
->setCenter($center)
|
||||
->setCircle(
|
||||
$this->getReference(
|
||||
LoadScopes::$references[array_rand(LoadScopes::$references)]
|
||||
)
|
||||
LoadScopes::$references[array_rand(LoadScopes::$references)]
|
||||
)
|
||||
);
|
||||
$manager->persist($event);
|
||||
$events[] = $event;
|
||||
|
@@ -70,20 +70,20 @@ class PickRoleType extends AbstractType
|
||||
$builder->addEventListener(
|
||||
FormEvents::PRE_SET_DATA,
|
||||
function (FormEvent $event) use ($options) {
|
||||
if (null === $options['event_type']) {
|
||||
$form = $event->getForm();
|
||||
$name = $form->getName();
|
||||
$config = $form->getConfig();
|
||||
$type = $config->getType()->getName();
|
||||
$options = $config->getOptions();
|
||||
if (null === $options['event_type']) {
|
||||
$form = $event->getForm();
|
||||
$name = $form->getName();
|
||||
$config = $form->getConfig();
|
||||
$type = $config->getType()->getName();
|
||||
$options = $config->getOptions();
|
||||
|
||||
$form->getParent()->add($name, $type, array_replace($options, [
|
||||
'group_by' => function (Role $r) {
|
||||
return $this->translatableStringHelper->localize($r->getType()->getName());
|
||||
},
|
||||
]));
|
||||
}
|
||||
}
|
||||
$form->getParent()->add($name, $type, array_replace($options, [
|
||||
'group_by' => function (Role $r) {
|
||||
return $this->translatableStringHelper->localize($r->getType()->getName());
|
||||
},
|
||||
]));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -74,17 +74,17 @@ class PickStatusType extends AbstractType
|
||||
$builder->addEventListener(
|
||||
FormEvents::PRE_SET_DATA,
|
||||
function (FormEvent $event) {
|
||||
$form = $event->getForm();
|
||||
$name = $form->getName();
|
||||
$config = $form->getConfig();
|
||||
$type = $config->getType()->getName();
|
||||
$options = $config->getOptions();
|
||||
$form->getParent()->add($name, $type, array_replace($options, [
|
||||
'group_by' => function (Status $s) {
|
||||
return $this->translatableStringHelper->localize($s->getType()->getName());
|
||||
},
|
||||
]));
|
||||
}
|
||||
$form = $event->getForm();
|
||||
$name = $form->getName();
|
||||
$config = $form->getConfig();
|
||||
$type = $config->getType()->getName();
|
||||
$options = $config->getOptions();
|
||||
$form->getParent()->add($name, $type, array_replace($options, [
|
||||
'group_by' => function (Status $s) {
|
||||
return $this->translatableStringHelper->localize($s->getType()->getName());
|
||||
},
|
||||
]));
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -92,8 +92,7 @@ class EventSearch extends AbstractSearch
|
||||
$limit = 50,
|
||||
array $options = [],
|
||||
$format = 'html'
|
||||
)
|
||||
{
|
||||
) {
|
||||
$total = $this->count($terms);
|
||||
$paginator = $this->paginationFactory->create($total);
|
||||
|
||||
|
@@ -235,9 +235,9 @@ class ParticipationControllerTest extends WebTestCase
|
||||
$this->personsIdsCache = array_merge(
|
||||
$this->personsIdsCache,
|
||||
$event->getParticipations()->map(
|
||||
function ($p) { return $p->getPerson()->getId(); }
|
||||
)
|
||||
->toArray()
|
||||
function ($p) { return $p->getPerson()->getId(); }
|
||||
)
|
||||
->toArray()
|
||||
);
|
||||
// get some random people
|
||||
$person1 = $this->getRandomPerson();
|
||||
@@ -476,8 +476,7 @@ class ParticipationControllerTest extends WebTestCase
|
||||
protected function getRandomEventWithMultipleParticipations(
|
||||
$centerName = 'Center A',
|
||||
$circleName = 'social'
|
||||
)
|
||||
{
|
||||
) {
|
||||
$event = $this->getRandomEvent($centerName, $circleName);
|
||||
|
||||
return $event->getParticipations()->count() > 1 ?
|
||||
|
Reference in New Issue
Block a user