You are here

public function CollectPathsEvent::addPaths in Tome 8

Adds multiple paths.

Parameters

array $paths: An array of paths, or an array mapping path names to metadata.

1 call to CollectPathsEvent::addPaths()
CollectPathsEvent::replacePaths in modules/tome_static/src/Event/CollectPathsEvent.php
Replaces all paths.

File

modules/tome_static/src/Event/CollectPathsEvent.php, line 70

Class

CollectPathsEvent
Wraps an array of paths that will be processed by the static generator.

Namespace

Drupal\tome_static\Event

Code

public function addPaths(array $paths) {
  foreach ($paths as $key => $value) {
    if (is_array($value)) {
      $this->paths[$key] = $value;
    }
    else {
      $this->paths[$value] = [];
    }
  }
}