Refactor
This commit is contained in:
parent
6b6b362a49
commit
c184f79f8a
1 changed files with 1 additions and 2 deletions
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Drupal\opd_presentations;
|
||||
|
||||
use Drupal\Core\Datetime\DrupalDateTime;
|
||||
use Drupal\node\Entity\Node;
|
||||
use Drupal\node\NodeInterface;
|
||||
|
||||
|
@ -15,7 +14,7 @@ final class Presentation extends Node implements NodeInterface {
|
|||
public function getPastEvents(): Events {
|
||||
$events = $this->get('field_events')->referencedEntities();
|
||||
|
||||
$today = (new DrupalDateTime('today'))->format('U');
|
||||
$today = strtotime('today');
|
||||
|
||||
return Events::new(array_filter(
|
||||
array: $events,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue