|
@@ 411-421 (lines=11) @@
|
| 408 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 409 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 410 |
|
$arrayGames = array(); |
| 411 |
|
foreach ($games as $game) { |
| 412 |
|
if ($game->getPublicationDate()) { |
| 413 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 414 |
|
} elseif ($game->getStartDate()) { |
| 415 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 416 |
|
} else { |
| 417 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 418 |
|
} |
| 419 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 420 |
|
$arrayGames[$key] = $game; |
| 421 |
|
} |
| 422 |
|
|
| 423 |
|
return $arrayGames; |
| 424 |
|
} |
|
@@ 583-593 (lines=11) @@
|
| 580 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 581 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 582 |
|
$arrayGames = array(); |
| 583 |
|
foreach ($games as $game) { |
| 584 |
|
if ($game->getPublicationDate()) { |
| 585 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 586 |
|
} elseif ($game->getStartDate()) { |
| 587 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 588 |
|
} else { |
| 589 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 590 |
|
} |
| 591 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 592 |
|
$arrayGames[$key] = $game; |
| 593 |
|
} |
| 594 |
|
|
| 595 |
|
return $arrayGames; |
| 596 |
|
} |