You are here

final class BlockPreprocessEventFactory in Hook Event Dispatcher 8

Class BlockPreprocessEventFactory.

Hierarchy

Expanded class hierarchy of BlockPreprocessEventFactory

1 string reference to 'BlockPreprocessEventFactory'
hook_event_dispatcher.services.yml in ./hook_event_dispatcher.services.yml
hook_event_dispatcher.services.yml
1 service uses BlockPreprocessEventFactory
preprocess_event.factory.block in ./hook_event_dispatcher.services.yml
Drupal\hook_event_dispatcher\Event\Preprocess\Factory\BlockPreprocessEventFactory

File

src/Event/Preprocess/Factory/BlockPreprocessEventFactory.php, line 11

Namespace

Drupal\hook_event_dispatcher\Event\Preprocess\Factory
View source
final class BlockPreprocessEventFactory implements PreprocessEventFactoryInterface {

  /**
   * {@inheritdoc}
   */
  public function createEvent(array &$variables) {
    return new BlockPreprocessEvent(new BlockEventVariables($variables));
  }

  /**
   * {@inheritdoc}
   */
  public function getEventHook() {
    return BlockPreprocessEvent::getHook();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BlockPreprocessEventFactory::createEvent public function Create the PreprocessEvent with the Variables object embedded. Overrides PreprocessEventFactoryInterface::createEvent
BlockPreprocessEventFactory::getEventHook public function Get the Event hook name. Overrides PreprocessEventFactoryInterface::getEventHook