automatic_updates.install in Automatic Updates 8.2
Same filename and directory in other branches
Contains install and update functions for Automatic Updates.
File
automatic_updates.installView source
<?php
/**
* @file
* Contains install and update functions for Automatic Updates.
*/
use Drupal\automatic_updates\Validation\ReadinessRequirements;
/**
* Implements hook_requirements().
*/
function automatic_updates_requirements($phase) {
if ($phase === 'runtime') {
/** @var \Drupal\automatic_updates\Validation\ReadinessRequirements $readiness_requirement */
$readiness_requirement = \Drupal::classResolver(ReadinessRequirements::class);
return $readiness_requirement
->getRequirements();
}
if ($phase === 'install' && !class_exists('PhpTuf\\ComposerStager\\Domain\\Beginner')) {
return [
'automatic_updates' => [
'description' => t('External dependencies for Automatic Updates are not available. Composer must be used to download the module with dependencies.'),
'severity' => REQUIREMENT_ERROR,
],
];
}
}
Functions
Name | Description |
---|---|
automatic_updates_requirements | Implements hook_requirements(). |