Functions
:local:
dump
{{ dump(vars) }}
Displays the content of the variable(s) on the screen.
The dump functions prints the contents of a variable.
This is useful for debugging.
Please ensure that the frontend debug mode is on, because otherwise the function does not print anything.
Internally Debugger is used.
{# print a single variable #}
{{ dump(foo) }}
{# print multiple variables #}
{{ dump(foo, bar, baz) }}
{# print all variables #}
{{ dump() }}
Arguments
- vars
-
Type:
mixedAny number of variables.
t3_cobject
{{ t3_cobject(
typoScriptObjectPath,
data = null,
currentValueKey = null,
table = null
) }}
Renders a TypoScript object. The content object renderer can be populated using the data argument.
Arguments
- typoScriptObjectPath
- Type:
string - data
- Type:
mixed|Default:null - currentValueKey
- Type:
string|Default:null - table
- Type:
string|Default:null
t3_form_render
{{ t3_form_render(
persistenceIdentifier = null,
factoryClass = 'TYPO3\\CMS\\Form\\Domain\\Factory\\ArrayFormFactory',
prototypeName = null,
overrideConfiguration = []
) }}
Renders a form using the form framework.
Note
To use the t3_form_render function you first have to create a new content element with the following typoscript config:
tt_content {
twig_testform = COA_INT
twig_testform {
20 = TWIGTEMPLATE
20 {
templateRootPaths {
10 = EXT:ExtensionName/Resources/Private/TwigTemplates
}
templateName = TwigtestContentElement.html.twig
settings {
persistenceIdentifier = 1:/form_definitions/formIdentifier.form.yaml
}
extbase.pluginName = Formframework
extbase.controllerExtensionName = Form
extbase.controllerName = FormFrontend
extbase.controllerActionName = perform
}
}
}
{{ t3_form_render(settings.persistenceIdentifier) }}
Warning
Formframeworks redirect finisher cannot be used as it throws a PropagateResponseException and Twig has no handling for that.
Arguments
- persistenceIdentifier
-
Type:
string|Default:nullThe identifier of the form, if a YAML file is used. If
null, then a Factory class needs to be set. - factoryClass
-
Type:
string|Default:'TYPO3\\CMS\\ Form\\ Domain\\ Factory\\ Array Form Factory' the fully qualified class name of the factory
- prototypeName
-
Type:
string|Default:nullname of the prototype to use
- overrideConfiguration
-
Type:
array|Default:[]Factory specific configuration. This will allow to add additional configuration related to the current view.
t3_uri_action
{{ t3_uri_action(
action,
arguments = [],
controller = null,
extensionName = null,
pluginName = null,
pageUid = null,
pageType = 0,
noCache = false,
section = '',
format = '',
linkAccessRestrictedPages = false,
additionalParams = [],
absolute = false,
addQueryString = false,
argumentsToBeExcludedFromQueryString = [],
addQueryStringMethod = ''
) }}
Arguments
- action
- Type:
string - arguments
- Type:
array|Default:[] - controller
- Type:
string|Default:null - extensionName
- Type:
string|Default:null - pluginName
- Type:
string|Default:null - pageUid
- Type:
int|Default:null - pageType
- Type:
int|Default:0 - noCache
- Type:
bool|Default:false - section
- Type:
string|Default:'' - format
- Type:
string|Default:'' - linkAccessRestrictedPages
- Type:
bool|Default:false - additionalParams
- Type:
array|Default:[] - absolute
- Type:
bool|Default:false - addQueryString
- Type:
bool|Default:false - argumentsToBeExcludedFromQueryString
- Type:
array|Default:[] - addQueryStringMethod
- Type:
string|Default:''
t3_uri_image
{{ t3_uri_image(
src = null,
treatIdAsReference = false,
image = null,
crop = null,
cropVariant = 'default',
width = '',
height = '',
minWidth = 0,
minHeight = 0,
maxWidth = 0,
maxHeight = 0,
absolute = false
) }}
Returns the URL to the given image. If an error occurs, then null is returned and no error is raised.
Arguments
- src
- Type:
string|Default:null - treatIdAsReference
- Type:
bool|Default:false - image
-
Type:
mixed|Default:nullthe image can be a reference or an instance of
FileorInterface FileReference - crop
-
Type:
string|Default:nullthe JSON-formatted crop settings
- cropVariant
- Type:
string|Default:'default' - width
- Type:
string|Default:'' - height
- Type:
string|Default:'' - minWidth
- Type:
int|Default:0 - minHeight
- Type:
int|Default:0 - maxWidth
- Type:
int|Default:0 - maxHeight
- Type:
int|Default:0 - absolute
- Type:
bool|Default:false
t3_uri_model
{{ t3_uri_model(model) }}
Generates a link fro the given domain model.
A link handler must be configured for the mapped table.
Arguments
- model
- Type:
TYPO3\CMS\ Extbase\ Domain Object\ Domain Object Interface
t3_uri_page
{{ t3_uri_page(
pageUid = null,
additionalParams = [],
pageType = 0,
noCache = false,
section = '',
linkAccessRestrictedPages = false,
absolute = false,
addQueryString = false,
argumentsToBeExcludedFromQueryString = [],
addQueryStringMethod = ''
) }}
Arguments
- pageUid
- Type:
int|Default:null - additionalParams
- Type:
array|Default:[] - pageType
- Type:
int|Default:0 - noCache
- Type:
bool|Default:false - section
- Type:
string|Default:'' - linkAccessRestrictedPages
- Type:
bool|Default:false - absolute
- Type:
bool|Default:false - addQueryString
- Type:
bool|Default:false - argumentsToBeExcludedFromQueryString
- Type:
array|Default:[] - addQueryStringMethod
- Type:
string|Default:''
t3_uri_record
{{ t3_uri_record(table, recordUid) }}
Generates a link for the given record.
A link handler must be configured for the mapped table.
Arguments
- table
-
Type:
stringthe table of the record
- recordUid
-
Type:
intthe UID of the record
t3_uri_typolink
{{ t3_uri_typolink(parameter, additionalParams = []) }}
Arguments
- parameter
- Type:
string - additionalParams
- Type:
array|Default:[]