Class to handle compiling template tag calls for "controlunit" in admin areas.

package XenForo_Template

 Methods

Compile the specified tag and return PHP code to handle it.

compile(\XenForo_Template_Compiler $compiler, string $tag, array $attributes, array $children, array $options) : string

Parameters

$compiler

\XenForo_Template_Compiler

The invoking compiler

$tag

string

Name of the tag called

$attributes

array

Attributes for the tag (may be empty)

$children

array

Nodes (tags/curlies/text) within this tag (may be empty)

$options

array

Compilation options

Returns

string

_compileChoiceChild()

_compileChoiceChild($newOutputVar, $child, \XenForo_Template_Compiler $compiler, array $options) 
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::_compileChoiceChild()

Parameters

$newOutputVar

$child

$compiler

$options

Helper to compile the standard row options with the default options.

_compileRowOptions(\XenForo_Template_Compiler $compiler, array $rowOptions, array $compilerOptions, $htmlCode, $htmlOutputVar) : string
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::_compileRowOptions()

Parameters

$rowOptions

array

$compilerOptions

array

$htmlCode

$htmlOutputVar

Returns

string

Compiles the standard data and removes it from the optional extra data for use as separate arguments.

_compileStandardData(\XenForo_Template_Compiler $compiler, array $compilerOptions, array $rowOptions, array $controlOptions) : array
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::_compileStandardData()

Parameters

$compiler

XenForo_Template_Compiler

$compilerOptions

array

Options for the compiler

$rowOptions

array

Row options. Will be modified by reference.

$controlOptions

array

Control options. Will be modified by reference.

Returns

arrayStandardized data (label, name, value)

Gets the choices that apply to this tag, via option/optgroup/options tags.

_getChoicesCode(array $children, \XenForo_Template_Compiler $compiler, array $options, string $newOutputVar) : string
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::_getChoicesCode()

Parameters

$children

array

Child tags to search

$compiler

\XenForo_Template_Compiler

Compiler

$options

array

Compiler options

$newOutputVar

string

Returns

string

Gets the compiled output for a function call, with extra preceding statements and variables to unset.

_getCompiledOutput(\XenForo_Template_Compiler $compiler, string $function, string $args, string | array $extraStatements, string | array $unsetVars) : \XenForo_Template_Compiler_Statement_Raw
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::_getCompiledOutput()

Parameters

$function

string

Function to call in XenForo_Template_Helper_Admin namespace

$args

string

String of PHP code for args

$extraStatements

stringarray

List of extra, raw PHP statements to prepend

$unsetVars

stringarray

List of variables to unset at the end, not including leading

Returns

Gets the control options for a given tag.

_getControlOptions(\XenForo_Template_Compiler $compiler, array $attributes, array $extraExpected, boolean $includeStandard, boolean $allowData) : array
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::_getControlOptions()

Parameters

$attributes

array

Raw key-value attribues list

$extraExpected

array

Extra expected attributes, on top of the standard

$includeStandard

boolean

If true, include the standard control tags

$allowData

boolean

If true, allow all data-* attributes

Returns

arrayKey-value pairs of expected attributes; data attributes in _data key

Gets all data-* attributes and returns them as an array without the data prefix.

_getDataAttributes(\XenForo_Template_Compiler $compiler, array $attributes) : array
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::_getDataAttributes()

Parameters

$compiler

$attributes

array

Returns

arrayKey-value data pairs, without the "data-" prefix

Gets the standard row options from attributes or child tags.

_getRowOptions(\XenForo_Template_Compiler $compiler, array $attributes, array $children, array $extraAllowedTags) : array
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::_getRowOptions()

Parameters

$attributes

array

Attributes

$children

array

Child elements

$extraAllowedTags

array

List of extra allowed child tags (that won't be treated as "content")

Returns

arrayKey-value pairs of row options

Gets the standard data out of a list of segments.

_getStandardAdminTagData(\XenForo_Template_Compiler $compiler, array $segments, array $extraAllowedTags) : array
Inherited

Data will be pulled from tags in that list and their attributes only.

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::_getStandardAdminTagData()

Parameters

$compiler

XenForo_Template_Compiler

$segments

array

List of segments

$extraAllowedTags

array

An optional list of additional tags that are allowed

Returns

arrayKeys are standard data types that were found

 Properties

 

Standard control-level options.

$_standardControlOptions : array
Inherited

These apply to most controls but not all. Use this if the control support most or all of the standard options.

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::$$_standardControlOptions
 

$_standardOptionTags

$_standardOptionTags 
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::$$_standardOptionTags
 

Standard options that apply to the row for (almost) all *unit tags.

$_standardRowOptions : array
Inherited

inherited_from \XenForo_Template_Compiler_Tag_Admin_Abstract::$$_standardRowOptions