|
@@ 432-442 (lines=11) @@
|
| 429 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 430 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 431 |
|
$arrayGames = array(); |
| 432 |
|
foreach ($games as $game) { |
| 433 |
|
if ($game->getPublicationDate()) { |
| 434 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 435 |
|
} elseif ($game->getStartDate()) { |
| 436 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 437 |
|
} else { |
| 438 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 439 |
|
} |
| 440 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 441 |
|
$arrayGames[$key] = $game; |
| 442 |
|
} |
| 443 |
|
|
| 444 |
|
return $arrayGames; |
| 445 |
|
} |
|
@@ 615-625 (lines=11) @@
|
| 612 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 613 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 614 |
|
$arrayGames = array(); |
| 615 |
|
foreach ($games as $game) { |
| 616 |
|
if ($game->getPublicationDate()) { |
| 617 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 618 |
|
} elseif ($game->getStartDate()) { |
| 619 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 620 |
|
} else { |
| 621 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 622 |
|
} |
| 623 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 624 |
|
$arrayGames[$key] = $game; |
| 625 |
|
} |
| 626 |
|
|
| 627 |
|
return $arrayGames; |
| 628 |
|
} |