class BlockVariantEvents

Same name in other branches
  1. 4.0.x src/Event/BlockVariantEvents.php \Drupal\ctools\Event\BlockVariantEvents

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

Title Sort descending Modifiers Object type Summary
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.