Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Connection.php

function Connection::enableEvents

Enables database API events dispatching.

Parameters

string[] $eventNames: A list of database events to be enabled.

Return value

static

File

core/lib/Drupal/Core/Database/Connection.php, line 1487

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function enableEvents(array $eventNames) : static {
    foreach ($eventNames as $eventName) {
        assert(class_exists($eventName), "Event class {$eventName} does not exist");
        $this->enabledEvents[$eventName] = TRUE;
    }
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal