Add a static helper to create a host entity

Created on 7 July 2025, about 18 hours ago

Problem/Motivation

I wonder if it'd be neat to have a static helper to create a host entity:

public static function create(Entity interface $entity) {
 $handler = \Drupal::entityTypeManager()->getHander($entity->getEntityTypeId(), 'registration_host_entity');
  return $handler->createHostEntity($entity);
}

Remaining tasks

User interface changes

None

API changes

A new API method on HostEntity.

Data model changes

None.

📌 Task
Status

Active

Version

3.4

Component

Registration Core

Created by

🇬🇧United Kingdom jonathanshaw Stroud, UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024