-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTemplateEngineProcesswire.module.php
More file actions
executable file
·39 lines (34 loc) · 1.06 KB
/
TemplateEngineProcesswire.module.php
File metadata and controls
executable file
·39 lines (34 loc) · 1.06 KB
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
35
36
37
38
39
<?php
namespace ProcessWire;
use TemplateEngineFactory\TemplateEngineProcessWire as ProcessWireEngine;
/**
* Provides a template engine using ProcessWire's internal template files.
*/
class TemplateEngineProcesswire extends WireData implements Module
{
/**
* @return array
*/
public static function getModuleInfo()
{
return [
'title' => 'Template Engine ProcessWire',
'version' => 210,
'author' => 'Stefan Wanzenried',
'summary' => 'ProcessWire templates for the TemplateEngineFactory.',
'singular' => true,
'autoload' => true,
'requires' => [
'TemplateEngineFactory>=2.0.0',
'PHP>=7.0',
'ProcessWire>=3.0',
],
];
}
public function init()
{
/** @var \ProcessWire\TemplateEngineFactory $factory */
$factory = $this->wire('modules')->get('TemplateEngineFactory');
$factory->registerEngine('ProcessWire', new ProcessWireEngine($factory->getArray()));
}
}