function Extension::isObsolete

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::isObsolete()
  2. 11.x core/lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::isObsolete()

Checks if an extension is marked as obsolete.

Return value

bool TRUE if an extension is marked as obsolete, FALSE otherwise.

1 call to Extension::isObsolete()
DatabaseDriver::isObsolete in core/lib/Drupal/Core/Extension/DatabaseDriver.php
Checks if an extension is marked as obsolete.
1 method overrides Extension::isObsolete()
DatabaseDriver::isObsolete in core/lib/Drupal/Core/Extension/DatabaseDriver.php
Checks if an extension is marked as obsolete.

File

core/lib/Drupal/Core/Extension/Extension.php, line 236

Class

Extension
Defines an extension (file) object.

Namespace

Drupal\Core\Extension

Code

public function isObsolete() : bool {
    // This function checks for 'lifecycle: obsolete' to determine if an
    // extension is marked as obsolete.
    return isset($this->info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER]) && $this->info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER] === ExtensionLifecycle::OBSOLETE;
}

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