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:
Oliver Davies 2025-06-10 20:47:23 +01:00
parent 7e45664407
commit 122f4a9bec
4 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
use Drupal\opd_presentations\Entity\Presentation;
/**
* Implements hook_entity_bundle_info_alter().
*
* @param array<non-empty-string, array{class: non-empty-string}> $bundles
*/
function opd_presentations_entity_bundle_info_alter(array &$bundles): void {
if (isset($bundles['node'])) {
$bundles['node']['presentation']['class'] = Presentation::class;
}
}