@@ 441-451 (lines=11) @@ | ||
438 | // je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
|
439 | // de type article avec le même procédé en les classant naturellement par date asc ou desc |
|
440 | $arrayGames = array(); |
|
441 | foreach ($games as $game) { |
|
442 | if ($game->getPublicationDate()) { |
|
443 | $key = $game->getPublicationDate()->format('Ymd'); |
|
444 | } elseif ($game->getStartDate()) { |
|
445 | $key = $game->getStartDate()->format('Ymd'); |
|
446 | } else { |
|
447 | $key = $game->getUpdatedAt()->format('Ymd'); |
|
448 | } |
|
449 | $key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
|
450 | $arrayGames[$key] = $game; |
|
451 | } |
|
452 | ||
453 | return $arrayGames; |
|
454 | } |
|
@@ 511-521 (lines=11) @@ | ||
508 | // je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
|
509 | // de type article avec le même procédé en les classant naturellement par date asc ou desc |
|
510 | $arrayGames = array(); |
|
511 | foreach ($games as $game) { |
|
512 | if ($game->getPublicationDate()) { |
|
513 | $key = $game->getPublicationDate()->format('Ymd'); |
|
514 | } elseif ($game->getStartDate()) { |
|
515 | $key = $game->getStartDate()->format('Ymd'); |
|
516 | } else { |
|
517 | $key = $game->getUpdatedAt()->format('Ymd'); |
|
518 | } |
|
519 | $key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
|
520 | $arrayGames[$key] = $game; |
|
521 | } |
|
522 | ||
523 | return $arrayGames; |
|
524 | } |
|
@@ 779-789 (lines=11) @@ | ||
776 | // je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
|
777 | // de type article avec le même procédé en les classant naturellement par date asc ou desc |
|
778 | $arrayGames = array(); |
|
779 | foreach ($games as $game) { |
|
780 | if ($game->getPublicationDate()) { |
|
781 | $key = $game->getPublicationDate()->format('Ymd'); |
|
782 | } elseif ($game->getStartDate()) { |
|
783 | $key = $game->getStartDate()->format('Ymd'); |
|
784 | } else { |
|
785 | $key = $game->getUpdatedAt()->format('Ymd'); |
|
786 | } |
|
787 | $key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
|
788 | $arrayGames[$key] = $game; |
|
789 | } |
|
790 | ||
791 | return $arrayGames; |
|
792 | } |