You are here

private function Updater::getExclusions in Automatic Updates 8.2

Gets the excluded paths collected by an event object.

Parameters

\Drupal\automatic_updates\Event\PreStartEvent|\Drupal\automatic_updates\Event\PreCommitEvent $event: The event object.

Return value

string[] The paths to exclude, relative to the active directory.

2 calls to Updater::getExclusions()
Updater::begin in src/Updater.php
Begins the update.
Updater::commit in src/Updater.php
Commits the current update.

File

src/Updater.php, line 166

Class

Updater
Defines a service to perform updates.

Namespace

Drupal\automatic_updates

Code

private function getExclusions(UpdateEvent $event) : array {
  $make_relative = function (string $path) : string {
    return str_replace($this->pathLocator
      ->getActiveDirectory() . '/', '', $path);
  };
  return array_map($make_relative, $event
    ->getExcludedPaths());
}