You are here

public function RegistrantFactoryInterface::createRegistrant in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/RegistrantFactoryInterface.php \Drupal\rng\RegistrantFactoryInterface::createRegistrant()
  2. 8 src/RegistrantFactoryInterface.php \Drupal\rng\RegistrantFactoryInterface::createRegistrant()

Create a registrant entity based on available contexts.

Parameters

array $context: An array of contexts, including:

  • event (required): An event entity.
  • identity_entity_type: Entity type ID of the identity.
  • identity_bundle: Bundle of the identity.
  • identity: A identity entity.

Return value

\Drupal\rng\Entity\RegistrantInterface A registrant entity.

Throws

\InvalidArgumentException If missing required context.

\Exception Miscellaneous errors, including missing configuration on event type.

1 method overrides RegistrantFactoryInterface::createRegistrant()
RegistrantFactory::createRegistrant in src/RegistrantFactory.php
Create a registrant entity based on available contexts.

File

src/RegistrantFactoryInterface.php, line 28

Class

RegistrantFactoryInterface
The registrant entity factory interface.

Namespace

Drupal\rng

Code

public function createRegistrant(array $context);