PHP Class Pimcore\Placeholder

Show file Open project: pimcore/pimcore

Protected Properties

Property Type Description
$document Contains the document object
$placeholderClassPrefixes string Prefixes for the Placeholder Classes
$placeholderPrefix string Prefix for the Placeholders
$placeholderSuffix string Suffix for the Placeholders

Public Methods

Method Description
addPlaceholderClassPrefix ( $classPrefix )
detectPlaceholders ( string $contentString, null | array $params, $document = null ) : array Detects the Placeholders in a string and returns an array with the placeholder information
getPlaceholderClassPrefixes ( ) : array Returns the Placeholder class prefixes
getPlaceholderPrefix ( ) : string Returns the Placeholder prefix
getPlaceholderSuffix ( ) : string Returns the Placeholder suffix
getWebsiteClassPrefix ( ) : string Returns the website class prefix for the Placeholder Classes
removePlaceholderClassPrefix ( $classPrefix ) : boolean
replacePlaceholders ( $mixed, array $params = [], $document = null, $enableLayoutOnPlaceholderReplacement = true ) : string Helper to simply replace the placeholders with their value
setPlaceholderPrefix ( string $prefix ) : void Set a custom Placeholder prefix
setPlaceholderSuffix ( $suffix )
setWebsiteClassPrefix ( $string ) Sets a custom website class prefix for the Placeholder Classes

Protected Methods

Method Description
replacePlaceholdersFromStack ( array $placeholderStack = [] ) : string Creates the Placeholder objects and replaces the placeholder string with the rendered content of the placeholder object

Method Details

addPlaceholderClassPrefix() public static method

public static addPlaceholderClassPrefix ( $classPrefix )
$classPrefix

detectPlaceholders() public method

Detects the Placeholders in a string and returns an array with the placeholder information
public detectPlaceholders ( string $contentString, null | array $params, $document = null ) : array
$contentString string
$params null | array
return array

getPlaceholderClassPrefixes() public static method

Returns the Placeholder class prefixes
public static getPlaceholderClassPrefixes ( ) : array
return array

getPlaceholderPrefix() public static method

Returns the Placeholder prefix
public static getPlaceholderPrefix ( ) : string
return string

getPlaceholderSuffix() public static method

Returns the Placeholder suffix
public static getPlaceholderSuffix ( ) : string
return string

getWebsiteClassPrefix() public static method

Returns the website class prefix for the Placeholder Classes
Deprecation: deprecated since version 1.4.6
public static getWebsiteClassPrefix ( ) : string
return string

removePlaceholderClassPrefix() public static method

public static removePlaceholderClassPrefix ( $classPrefix ) : boolean
$classPrefix
return boolean

replacePlaceholders() public method

Helper to simply replace the placeholders with their value
public replacePlaceholders ( $mixed, array $params = [], $document = null, $enableLayoutOnPlaceholderReplacement = true ) : string
$params array
return string

replacePlaceholdersFromStack() protected method

Creates the Placeholder objects and replaces the placeholder string with the rendered content of the placeholder object
protected replacePlaceholdersFromStack ( array $placeholderStack = [] ) : string
$placeholderStack array
return string

setPlaceholderPrefix() public static method

Set a custom Placeholder prefix
Deprecation: deprecated since version 1.4.6
public static setPlaceholderPrefix ( string $prefix ) : void
$prefix string
return void

setPlaceholderSuffix() public method

public setPlaceholderSuffix ( $suffix )
$suffix

setWebsiteClassPrefix() public static method

Sets a custom website class prefix for the Placeholder Classes
Deprecation: deprecated since version 1.4.6
public static setWebsiteClassPrefix ( $string )
$string

Property Details

$document protected property

Contains the document object
protected $document

$placeholderClassPrefixes protected static property

Prefixes for the Placeholder Classes
protected static string $placeholderClassPrefixes
return string

$placeholderPrefix protected static property

Prefix for the Placeholders
protected static string $placeholderPrefix
return string

$placeholderSuffix protected static property

Suffix for the Placeholders
protected static string $placeholderSuffix
return string