model/modx/modparser095.class.php

Includes Classes 
package
modx
Classes
modParser095

Description

\modParser095

Extends from
\modParser
package
modx
Properties
$tagTranslation
Methods
processElementTags
translate

Description

An extension of the MODX parser to support legacy MODX tags.

Use of this class is only necessary if you have a site that contains legacy MODX tags. It provides facilities for translating the legacy tags, as well as for supporting legacy behavior of the onParseDocument event used in many legacy MODX plugins.

Properties

$tagTranslation

 $tagTranslation = 'array'

Details

visibility
public
default
array
final
false
static
false

Methods

processElementTags

processElementTags( string $parentTag, string $content, boolean $processUncacheable = false, boolean $removeUnprocessed = false, string $prefix = [[, string $suffix = ]], array $tokens = array,  $echo = false ) :

Adds the legacy tag translation and legacy OnParseDocument event support.

Arguments
$parentTag
string
The tag representing the element processing this tag. Pass an empty string to allow parsing without this recursion check.
$content
string
&$content The content to process and act on (by reference).
$processUncacheable
boolean
Determines if noncacheable tags are to be processed (default= false).
$removeUnprocessed
boolean
Determines if unprocessed tags should be left in place in the content, or stripped out (default= false).
$prefix
string
The characters that define the start of a tag (default= "[[").
$suffix
string
The characters that define the end of a tag (default= "]]").
$tokens
array
Indicates that the parser should only process tags with the tokens included in this array.
$echo
Details
visibility
public
final
false
static
false

translate

translate( string $content, array $tokens = array,  $echo = false ) : void

Collects MODX legacy tags and translates them to the new tag format.

Arguments
$content
string
&$content The content in which legacy tags are to be replaced.
$tokens
array
An optional array of tag tokens on which to exclude translation of the tags.
$echo
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox 0.11.2.