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 1503  
Class
- Connection
 - Base Database API class.
 
Namespace
Drupal\Core\DatabaseCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.