You are here

public static function EventMeta::createInstance in RNG - Events and Registrations 3.x

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

Instantiates a new instance of EventMeta handler.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container.

\Drupal\Core\Entity\EntityInterface $entity: The event entity.

Return value

static A new EventMeta instance.

Overrides EventMetaInterface::createInstance

1 call to EventMeta::createInstance()
EventManager::getMeta in src/EventManager.php
Get the meta instance for an event.

File

src/EventMeta.php, line 132

Class

EventMeta
Meta event wrapper for RNG.

Namespace

Drupal\rng

Code

public static function createInstance(ContainerInterface $container, EntityInterface $entity) {
  return new static($container
    ->get('entity_type.manager'), $container
    ->get('entity_type.bundle.info'), $container
    ->get('config.factory'), $container
    ->get('plugin.manager.entity_reference_selection'), $container
    ->get('plugin.manager.identity_channel'), $container
    ->get('rng.configuration'), $container
    ->get('rng.event_manager'), $container
    ->get('courier.manager'), $container
    ->get('plugin.manager.action'), $entity);
}