|
@@ 585-595 (lines=11) @@
|
| 582 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 583 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 584 |
|
$arrayGames = array(); |
| 585 |
|
foreach ($games as $game) { |
| 586 |
|
if ($game->getPublicationDate()) { |
| 587 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 588 |
|
} elseif ($game->getStartDate()) { |
| 589 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 590 |
|
} else { |
| 591 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 592 |
|
} |
| 593 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 594 |
|
$arrayGames[$key] = $game; |
| 595 |
|
} |
| 596 |
|
|
| 597 |
|
return $arrayGames; |
| 598 |
|
} |
|
@@ 755-765 (lines=11) @@
|
| 752 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 753 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 754 |
|
$arrayGames = array(); |
| 755 |
|
foreach ($games as $game) { |
| 756 |
|
if ($game->getPublicationDate()) { |
| 757 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 758 |
|
} elseif ($game->getStartDate()) { |
| 759 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 760 |
|
} else { |
| 761 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 762 |
|
} |
| 763 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 764 |
|
$arrayGames[$key] = $game; |
| 765 |
|
} |
| 766 |
|
|
| 767 |
|
return $arrayGames; |
| 768 |
|
} |