function StatusCheckEvent::__construct
Constructs a StatusCheckEvent object.
Parameters
\Drupal\package_manager\StageBase $stage: The stage which fired this event.
\PhpTuf\ComposerStager\API\Path\Value\PathListInterface|\Throwable $excluded_paths: The list of paths to exclude or, if an error occurred while they were being collected, the throwable from that error. If this is a throwable, it will be converted to a validation error.
Overrides StageEvent::__construct
File
-
core/
modules/ package_manager/ src/ Event/ StatusCheckEvent.php, line 37
Class
- StatusCheckEvent
- Event fired to check the status of the system to use Package Manager.
Namespace
Drupal\package_manager\EventCode
public function __construct(StageBase $stage, PathListInterface|\Throwable $excluded_paths) {
parent::__construct($stage);
// If there was an error collecting the excluded paths, convert it to a
// validation error so we can still run status checks that don't need to
// examine the list of excluded paths.
if ($excluded_paths instanceof \Throwable) {
$this->addErrorFromThrowable($excluded_paths);
$excluded_paths = NULL;
}
else {
$excluded_paths = new ImmutablePathList($excluded_paths);
}
$this->excludedPaths = $excluded_paths;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.