function Connection::isEventEnabled

Same name in other branches
  1. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::isEventEnabled()

Returns the status of a database API event toggle.

Parameters

string $eventName: The name of the event to check.

Return value

bool TRUE if the event is going to be fired by the database API, FALSE otherwise.

File

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

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function isEventEnabled(string $eventName) : bool {
    return $this->enabledEvents[$eventName] ?? FALSE;
}

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