forked from a64f7bb4-7358-4778-9fbe-3b882c34cc1d/v1
18 lines
433 B
Twig
18 lines
433 B
Twig
<?php
|
|
|
|
/**
|
|
* @file
|
|
* Primary module hooks for {{ name }} module.
|
|
*/
|
|
|
|
/**
|
|
* Implements hook_entity_bundle_info_alter().
|
|
*/
|
|
function {{ machine_name }}_entity_bundle_info_alter(array &$bundles): void {
|
|
{% for bundle_id, class_fqn in classes_fqn %}
|
|
if (isset($bundles['{{ entity_type_id }}']['{{ bundle_id }}'])) {
|
|
$bundles['{{ entity_type_id }}']['{{ bundle_id }}']['class'] = {{ class_fqn }}::class;
|
|
}
|
|
{% endfor %}
|
|
}
|