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