trait ExcludedPathsTrait in Automatic Updates 8.2
Common functionality for events which can collect excluded paths.
Hierarchy
- trait \Drupal\automatic_updates\Event\ExcludedPathsTrait
File
- src/
Event/ ExcludedPathsTrait.php, line 8
Namespace
Drupal\automatic_updates\EventView source
trait ExcludedPathsTrait {
/**
* Paths to exclude from the update.
*
* @var string[]
*/
protected $excludedPaths = [];
/**
* Adds an absolute path to exclude from the update operation.
*
* @todo This should only accept paths relative to the active directory.
*
* @param string $path
* The path to exclude.
*/
public function excludePath(string $path) : void {
$this->excludedPaths[] = $path;
}
/**
* Returns the paths to exclude from the update operation.
*
* @return string[]
* The paths to exclude.
*/
public function getExcludedPaths() : array {
return array_unique($this->excludedPaths);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExcludedPathsTrait:: |
protected | property | Paths to exclude from the update. | |
ExcludedPathsTrait:: |
public | function | Adds an absolute path to exclude from the update operation. | |
ExcludedPathsTrait:: |
public | function | Returns the paths to exclude from the update operation. |