PHP Class eZ\Publish\Core\FieldType\RichText\Converter\Xslt

Inheritance: extends eZ\Publish\Core\FieldType\RichText\XmlBase, implements eZ\Publish\Core\FieldType\RichText\Converter
Exibir arquivo Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$customStylesheets array Array of XSL stylesheets to add to the main one, grouped by priority.
$stylesheet string Path to stylesheet to use.

Public Methods

Method Description
__construct ( string $stylesheet, array $customStylesheets = [] ) Constructor.
convert ( DOMDocument $document ) : DOMDocument Performs conversion of the given $document using XSLT stylesheet.

Protected Methods

Method Description
getSortedCustomStylesheets ( ) : array Returns custom stylesheets to load, sorted.
getXSLTProcessor ( ) : XSLTProcessor Returns the XSLTProcessor to use to transform internal XML to HTML5.

Method Details

__construct() public method

Constructor.
public __construct ( string $stylesheet, array $customStylesheets = [] )
$stylesheet string Stylesheet to use for conversion
$customStylesheets array Array of XSL stylesheets. Each entry consists in a hash having "path" and "priority" keys.

convert() public method

Performs conversion of the given $document using XSLT stylesheet.
public convert ( DOMDocument $document ) : DOMDocument
$document DOMDocument
return DOMDocument

getSortedCustomStylesheets() protected method

The order is from the lowest priority to the highest since in case of a conflict, the last loaded XSL template always wins.
protected getSortedCustomStylesheets ( ) : array
return array

getXSLTProcessor() protected method

Returns the XSLTProcessor to use to transform internal XML to HTML5.
protected getXSLTProcessor ( ) : XSLTProcessor
return XSLTProcessor

Property Details

$customStylesheets protected_oe property

Array of XSL stylesheets to add to the main one, grouped by priority.
protected array $customStylesheets
return array

$stylesheet protected_oe property

Path to stylesheet to use.
protected string $stylesheet
return string