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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jonathanshaw created an issue. See original summary.

jonathanshaw’s picture

Status: Active » Needs review

john.oltman’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.