protected function StaticGenerator::getDestination in Tome 8
Returns a destination for saving a given path.
Parameters
string $path: The path.
Return value
string The destination.
2 calls to StaticGenerator::getDestination()
- StaticGenerator::exportPaths in modules/
tome_static/ src/ StaticGenerator.php - Exports multiple paths.
- StaticGenerator::requestPath in modules/
tome_static/ src/ StaticGenerator.php - Requests and exports a given path.
File
- modules/
tome_static/ src/ StaticGenerator.php, line 483
Class
- StaticGenerator
- Handles static site generation.
Namespace
Drupal\tome_staticCode
protected function getDestination($path) {
$event = new ModifyDestinationEvent($path);
$this->eventDispatcher
->dispatch(TomeStaticEvents::MODIFY_DESTINATION, $event);
$path = $event
->getDestination();
$path = urldecode($path);
$path = $this
->sanitizePath($path);
if (empty(pathinfo($path, PATHINFO_EXTENSION))) {
$path .= '/index.html';
}
return $this
->joinPaths($this
->getStaticDirectory(), $path);
}