forked from TYPO3/Fluid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommentViewHelper.php
More file actions
73 lines (68 loc) · 1.54 KB
/
CommentViewHelper.php
File metadata and controls
73 lines (68 loc) · 1.54 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
namespace TYPO3Fluid\Fluid\ViewHelpers;
/*
* This file belongs to the package "TYPO3 Fluid".
* See LICENSE.txt that was shipped with this package.
*/
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\ParserRuntimeOnly;
/**
* This ViewHelper prevents rendering of any content inside the tag.
*
* Contents of the comment will still be **parsed** thus throwing an
* Exception if it contains syntax errors. You can put child nodes in
* CDATA tags to avoid this.
*
* Using this ViewHelper won't have a notable effect on performance,
* especially once the template is parsed. However it can lead to reduced
* readability. You can use layouts and partials to split a large template
* into smaller parts. Using self-descriptive names for the partials can
* make comments redundant.
*
* Examples
* ========
*
* Commenting out fluid code
* -------------------------
*
* ::
*
* Before
* <f:comment>
* This is completely hidden.
* <f:debug>This does not get rendered</f:debug>
* </f:comment>
* After
*
* Output::
*
* Before
* After
*
* Prevent parsing
* ---------------
*
* ::
*
* <f:comment><![CDATA[
* <f:some.invalid.syntax />
* ]]></f:comment>
*
* Output:
*
* Will be nothing.
*
* @api
*/
class CommentViewHelper extends AbstractViewHelper
{
use ParserRuntimeOnly;
/**
* @var boolean
*/
protected $escapeChildren = false;
/**
* @var boolean
*/
protected $escapeOutput = false;
}