function ExtensionLifecycle::isValid
Same name in other branches
- 9 core/lib/Drupal/Core/Extension/ExtensionLifecycle.php \Drupal\Core\Extension\ExtensionLifecycle::isValid()
- 10 core/lib/Drupal/Core/Extension/ExtensionLifecycle.php \Drupal\Core\Extension\ExtensionLifecycle::isValid()
Determines if a given extension lifecycle string is valid.
Parameters
string $lifecycle: The lifecycle to validate.
Return value
bool TRUE if the lifecycle is valid, otherwise FALSE.
3 calls to ExtensionLifecycle::isValid()
- ComponentMetadata::__construct in core/
modules/ sdc/ src/ Component/ ComponentMetadata.php - ComponentMetadata constructor.
- ComponentMetadata::__construct in core/
lib/ Drupal/ Core/ Theme/ Component/ ComponentMetadata.php - ComponentMetadata constructor.
- InfoParserDynamic::parse in core/
lib/ Drupal/ Core/ Extension/ InfoParserDynamic.php - Parses Drupal module, theme and profile .info.yml files.
File
-
core/
lib/ Drupal/ Core/ Extension/ ExtensionLifecycle.php, line 56
Class
- ExtensionLifecycle
- Extension lifecycle.
Namespace
Drupal\Core\ExtensionCode
public static function isValid(string $lifecycle) : bool {
$valid_values = [
self::EXPERIMENTAL,
self::STABLE,
self::DEPRECATED,
self::OBSOLETE,
];
return in_array($lifecycle, $valid_values, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.