|
@@ 431-441 (lines=11) @@
|
| 428 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 429 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 430 |
|
$arrayGames = array(); |
| 431 |
|
foreach ($games as $game) { |
| 432 |
|
if ($game->getPublicationDate()) { |
| 433 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 434 |
|
} elseif ($game->getStartDate()) { |
| 435 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 436 |
|
} else { |
| 437 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 438 |
|
} |
| 439 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 440 |
|
$arrayGames[$key] = $game; |
| 441 |
|
} |
| 442 |
|
|
| 443 |
|
return $arrayGames; |
| 444 |
|
} |
|
@@ 603-613 (lines=11) @@
|
| 600 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 601 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 602 |
|
$arrayGames = array(); |
| 603 |
|
foreach ($games as $game) { |
| 604 |
|
if ($game->getPublicationDate()) { |
| 605 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 606 |
|
} elseif ($game->getStartDate()) { |
| 607 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 608 |
|
} else { |
| 609 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 610 |
|
} |
| 611 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 612 |
|
$arrayGames[$key] = $game; |
| 613 |
|
} |
| 614 |
|
|
| 615 |
|
return $arrayGames; |
| 616 |
|
} |