Add a PodcastEpisode bundle class
This commit is contained in:
parent
0871649c05
commit
52c1b33711
2 changed files with 33 additions and 4 deletions
18
modules/opd_podcast/src/Entity/PodcastEpisode.php
Normal file
18
modules/opd_podcast/src/Entity/PodcastEpisode.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Drupal\opd_podcast\Entity;
|
||||
|
||||
use Drupal\node\Entity\Node;
|
||||
use Drupal\node\NodeInterface;
|
||||
|
||||
final class PodcastEpisode extends Node implements NodeInterface {
|
||||
|
||||
public const NODE_TYPE = 'podcast_episode';
|
||||
|
||||
public function getGuests(): array {
|
||||
return $this->get('field_podcast_guests')->referencedEntities();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue