diff --git a/web/modules/custom/custom/custom.module b/web/modules/custom/custom/custom.module index c7ad0c015..e1181b1c5 100644 --- a/web/modules/custom/custom/custom.module +++ b/web/modules/custom/custom/custom.module @@ -13,7 +13,7 @@ use Drupal\discoverable_entity_bundle_classes\Storage\Node\NodeStorage; * Implements hook_entity_type_build(). */ function custom_entity_type_build(array &$entityTypes): void { - /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entityTypes */ + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entityTypes */ if (isset($entityTypes['node'])) { $entityTypes['node']->setStorageClass(NodeStorage::class); } diff --git a/web/modules/custom/custom/src/Entity/Node.php b/web/modules/custom/custom/src/Entity/Node/Talk.php similarity index 52% rename from web/modules/custom/custom/src/Entity/Node.php rename to web/modules/custom/custom/src/Entity/Node/Talk.php index eecbb6705..25db19e59 100644 --- a/web/modules/custom/custom/src/Entity/Node.php +++ b/web/modules/custom/custom/src/Entity/Node/Talk.php @@ -1,14 +1,22 @@ hasField('field_events')) { - return NULL; - } - return Collection::make($this->get('field_events')->referencedEntities()) ->map(fn(ParagraphInterface $event) => $event->get('field_date') ->getString())