You are here

final class BlockVariantEvents in Chaos Tool Suite (ctools) 8.3

Contains all events dispatched while manipulating blocks in a variant.

Hierarchy

Expanded class hierarchy of BlockVariantEvents

2 files declare their use of BlockVariantEvents
BlockDisplayVariantTest.php in tests/src/Kernel/BlockDisplayVariantTest.php
BlockVariantTrait.php in src/Plugin/BlockVariantTrait.php

File

src/Event/BlockVariantEvents.php, line 8

Namespace

Drupal\ctools\Event
View source
final class BlockVariantEvents {

  /**
   * The name of the event triggered when a block is added to a variant.
   *
   * This event allows modules to react to a block being added to a variant. The
   * event listener method receives a \Drupal\ctools\Event\BlockVariantEvent
   * instance.
   *
   * @Event
   *
   * @var string
   */
  const ADD_BLOCK = 'block.add';

  /**
   * The name of the event triggered when a block is modified in a variant.
   *
   * This event allows modules to react to a block being modified in a variant.
   * The event listener method receives a \Drupal\ctools\Event\BlockVariantEvent
   * instance.
   *
   * @Event
   *
   * @var string
   */
  const UPDATE_BLOCK = 'block.update';

  /**
   * The name of the event triggered when a block is removed from a variant.
   *
   * This event allows modules to react to a block being removed from a variant.
   * The event listener method receives a \Drupal\ctools\Event\BlockVariantEvent
   * instance.
   *
   * @Event
   *
   * @var string
   */
  const DELETE_BLOCK = 'block.delete';

}

Members

Namesort descending Modifiers Type Description Overrides
BlockVariantEvents::ADD_BLOCK constant The name of the event triggered when a block is added to a variant.
BlockVariantEvents::DELETE_BLOCK constant The name of the event triggered when a block is removed from a variant.
BlockVariantEvents::UPDATE_BLOCK constant The name of the event triggered when a block is modified in a variant.