Add a Presentation bundle class
Drupal core issue: https://www.drupal.org/node/2570593 Change record: https://www.drupal.org/node/3191609
This commit is contained in:
parent
7e45664407
commit
122f4a9bec
4 changed files with 68 additions and 0 deletions
16
modules/opd_presentations/src/Entity/Presentation.php
Normal file
16
modules/opd_presentations/src/Entity/Presentation.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Drupal\opd_presentations\Entity;
|
||||
|
||||
use Drupal\node\Entity\Node;
|
||||
use Drupal\node\NodeInterface;
|
||||
|
||||
final class Presentation extends Node implements NodeInterface {
|
||||
|
||||
public function getPastEvents(): array {
|
||||
return $this->get('field_events')->referencedEntities();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue