StatementEvent.php

Same filename and directory in other branches
  1. 10 core/lib/Drupal/Core/Database/Event/StatementEvent.php

Namespace

Drupal\Core\Database\Event

File

core/lib/Drupal/Core/Database/Event/StatementEvent.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Core\Database\Event;


/**
 * Enumeration of the statement related database events.
 */
enum StatementEvent : string
{
  case ExecutionStart = StatementExecutionStartEvent::class;
  case ExecutionEnd = StatementExecutionEndEvent::class;
  case ExecutionFailure = StatementExecutionFailureEvent::class;
  
  /**
   * Returns an array with all statement related events.
   *
   * @return list<class-string<\Drupal\Core\Database\Event\DatabaseEvent>>
   *   An array with all statement related events.
   */
  public static function all() : array {
    return array_map(fn(self $case) => $case->value, self::cases());
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.