You are here

public static function EventMeta::createInstance in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/EventMeta.php \Drupal\rng\EventMeta::createInstance()
  2. 3.x 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 99

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.manager'), $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'), $entity);
}