21 lines
562 B
PHP
21 lines
562 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Drupal\opd_presentations\Entity\Event;
|
|
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;
|
|
}
|
|
|
|
if (isset($bundles['paragraph'])) {
|
|
$bundles['paragraph'][Event::PARAGRAPH_TYPE]['class'] = Event::class;
|
|
}
|
|
}
|