Abstract base for template tags that apply to the admin area.

package XenForo_Template

 Methods

_compileChoiceChild()

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

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

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

Parameters

$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

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

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

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

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

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

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

Parameters

$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

 

$_standardControlOptions : array

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

 

$_standardOptionTags 
 

$_standardRowOptions : array