-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPicoPageFolders.php
34 lines (27 loc) · 970 Bytes
/
PicoPageFolders.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
class PicoPageFolders extends AbstractPicoPlugin {
const API_VERSION = 2;
private $plugin;
public function onConfigLoaded(&$config) {
$this->plugin = new \PicoPageFolders\Plugin(
$config,
new \PicoPageFolders\Wrappers\GetWrapper(),
new \PicoPageFolders\Wrappers\FileSystemWrapper());
}
public function onRequestUrl(&$requestUrl) {
$this->plugin->processUrl($requestUrl);
}
public function onSinglePageLoading($id, &$skipFile) {
$this->plugin->processId($id);
$skipFile = $this->plugin->skipLoading($id);
}
public function onPagesLoaded(&$pages) {
$this->plugin->hidePages($pages);
}
public function onPageRendering(&$twigTemplate, &$twigVariables) {
$this->plugin->setTemplateVariables($twigVariables);
}
public function on404ContentLoaded(&$rawContent) {
$this->plugin->load404($rawContent);
}
}