-
Notifications
You must be signed in to change notification settings - Fork 229
/
AssetViewHelper.php
63 lines (60 loc) · 2.48 KB
/
AssetViewHelper.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace FluidTYPO3\Vhs\ViewHelpers;
/*
* This file is part of the FluidTYPO3/Vhs project under GPLv2 or later.
*
* For the full copyright and license information, please read the
* LICENSE.md file that was distributed with this source code.
*/
use FluidTYPO3\Vhs\ViewHelpers\Asset\AbstractAssetViewHelper;
/**
* ### Basic Asset ViewHelper
*
* Places the contents of the asset (the tag body) directly
* in the additional header content of the page. This most
* basic possible version of an Asset has only the core
* features shared by every Asset type:
*
* - a "name" attribute which is required, identifying the Asset
* by a lowerCamelCase or lowercase_underscored value, your
* preference (but lowerCamelCase recommended for consistency).
* - a "dependencies" attribute with a CSV list of other named
* Assets upon which the current Asset depends. When used, this
* Asset will be included after every asset listed as dependency.
* - a "group" attribute which is optional and is used ty further
* identify the Asset as belonging to a particular group which
* can be suppressed or manipulated through TypoScript. For
* example, the default value is "fluid" and if TypoScript is
* used to exclude the group "fluid" then any Asset in that
* group will simply not be loaded.
* - an "overwrite" attribute which if enabled causes any existing
* asset with the same name to be overwritten with the current
* Asset instead. If rendered in a loop only the last instance
* is actually used (this allows Assets in Partials which are
* rendered in an f:for loop).
* - a "debug" property which enables output of the information
* used by the current Asset, with an option to force debug
* mode through TypoScript.
* - additional properties which affect how the Asset is processed.
* For a full list see the argument descriptions; the same
* settings can be applied through TypoScript per-Asset, globally
* or per-Asset-group.
*
* > Note: there are no static TypoScript templates for VHS but
* > you will find a complete list in the README.md file in the
* > root of the extension folder.
*/
class AssetViewHelper extends AbstractAssetViewHelper
{
public function initializeArguments(): void
{
parent::initializeArguments();
$this->overrideArgument(
'standalone',
'boolean',
'If TRUE, excludes this Asset from any concatenation which may be applied',
false,
true
);
}
}