You are here

class DateRecurValueEvent in Recurring Dates Field 3.x

Same name and namespace in other branches
  1. 8.2 src/Event/DateRecurValueEvent.php \Drupal\date_recur\Event\DateRecurValueEvent
  2. 3.0.x src/Event/DateRecurValueEvent.php \Drupal\date_recur\Event\DateRecurValueEvent
  3. 3.1.x src/Event/DateRecurValueEvent.php \Drupal\date_recur\Event\DateRecurValueEvent

Event dispatched when an entity containing a date recur field is modified.

Hierarchy

  • class \Drupal\date_recur\Event\DateRecurValueEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of DateRecurValueEvent

2 files declare their use of DateRecurValueEvent
DateRecurFieldItemList.php in src/Plugin/Field/FieldType/DateRecurFieldItemList.php
DateRecurOccurrences.php in src/DateRecurOccurrences.php

File

src/Event/DateRecurValueEvent.php, line 13

Namespace

Drupal\date_recur\Event
View source
class DateRecurValueEvent extends Event {

  /**
   * The field list.
   *
   * @var \Drupal\date_recur\Plugin\Field\FieldType\DateRecurFieldItemList
   */
  protected $field;

  /**
   * Whether the entity was created.
   *
   * @var bool
   */
  protected $insert;

  /**
   * DateRecurValueEvent constructor.
   *
   * @param \Drupal\date_recur\Plugin\Field\FieldType\DateRecurFieldItemList $field
   *   The date recur field item list.
   * @param bool $insert
   *   Specifies whether the entity was created.
   */
  public function __construct(DateRecurFieldItemList $field, $insert) {
    $this->field = $field;
    $this->insert = $insert;
  }

  /**
   * Get the field list.
   *
   * The field cannot be changed because the entity has already been saved.
   *
   * @return \Drupal\date_recur\Plugin\Field\FieldType\DateRecurFieldItemList
   *   The date recur field item list.
   */
  public function getField() : DateRecurFieldItemList {
    return $this->field;
  }

  /**
   * Get whether the entity was created.
   *
   * @return bool
   *   Whether the entity was created.
   */
  public function isInsert() : bool {
    return $this->insert;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DateRecurValueEvent::$field protected property The field list.
DateRecurValueEvent::$insert protected property Whether the entity was created.
DateRecurValueEvent::getField public function Get the field list.
DateRecurValueEvent::isInsert public function Get whether the entity was created.
DateRecurValueEvent::__construct public function DateRecurValueEvent constructor.