-
Notifications
You must be signed in to change notification settings - Fork 611
/
TemplateEvent.php
45 lines (39 loc) · 1.08 KB
/
TemplateEvent.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
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* @link https://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license https://craftcms.github.io/license/
*/
namespace craft\events;
use craft\web\View;
/**
* TemplateEvent class.
*
* @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
* @since 3.0.0
*/
class TemplateEvent extends CancelableEvent
{
/**
* @var string The name of the template being rendered
*/
public string $template;
/**
* @var array The variables to be passed to the template
*/
public array $variables;
/**
* @var string The template mode to be used
* @phpstan-var View::TEMPLATE_MODE_CP|View::TEMPLATE_MODE_SITE
* @since 3.4.0
*/
public string $templateMode;
/**
* @var string The rendering result of [[\craft\web\View::renderTemplate()]].
*
* Event handlers may modify this property and the modified output will be
* returned by [[\craft\web\View::renderTemplate()]]. This property is only used
* by [[\craft\web\View::EVENT_AFTER_RENDER_TEMPLATE]] event.
*/
public string $output;
}