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