forked from sofascore/purgatory-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompetitionController.php
More file actions
36 lines (31 loc) · 1.18 KB
/
CompetitionController.php
File metadata and controls
36 lines (31 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
declare(strict_types=1);
namespace Sofascore\PurgatoryBundle\Tests\Functional\TestApplication\Controller;
use Sofascore\PurgatoryBundle\Attribute\PurgeOn;
use Sofascore\PurgatoryBundle\Tests\Functional\TestApplication\Entity\Competition\Competition;
use Symfony\Component\HttpKernel\Attribute\AsController;
use Symfony\Component\Routing\Annotation\Route as AnnotationRoute;
use Symfony\Component\Routing\Attribute\Route;
#[AsController]
#[Route('/competition')]
#[AnnotationRoute('/competition')]
class CompetitionController
{
#[Route('/ordered-by-number-of-pets', 'competitions_ordered_by_number_of_pets')]
#[AnnotationRoute('/ordered-by-number-of-pets', name: 'competitions_ordered_by_number_of_pets')]
#[PurgeOn(Competition::class, target: 'numberOfPets')]
public function orderedCompetitionsAction(): void
{
}
#[Route('/by-winner/{winner_id}', 'competitions_by_winner')]
#[AnnotationRoute('/by-winner/{winner_id}', name: 'competitions_by_winner')]
#[PurgeOn(Competition::class,
target: 'winner',
routeParams: [
'winner_id' => 'winner.id',
],
)]
public function competitionsByWinnerAction(): void
{
}
}