PHP Class Pimcore\Placeholder\AbstractPlaceholder

Show file Open project: pimcore/pimcore

Protected Properties

Property Type Description
$contentString string The Content as string
$document Pimcore\Model\Document | null The passed Document Object
$locale Zend_Locale
$params array All dynamic parameters which are passed to the Placeholder
$placeholderConfig Zend_Config_Json The config object passed from the placeholder If no config object was passed a empty \Zend_Config_Json is passed
$placeholderKey string The placeholder key passed to determine the dynamic parameter
$placeholderString string The placeholder string e.g "%Object(object_id,{"method" : "getName"})"

Public Methods

Method Description
getContentString ( ) : null | string returns the full content string
getDocument ( ) : Document | null Returns the Document
getEmptyValue ( ) : string Will be used as replacement if the passed parameter is empty
getLanguage ( ) : string Returns the current language
getLocale ( ) : Zend_Locale Returns the current locale
getParam ( string $key ) : mixed Returns a specific parameter
getParams ( ) : array Returns the Parameters ob the Placeholder object
getPlaceholderConfig ( ) : Zend_Config_Json Returns the Placeholder config object
getPlaceholderKey ( ) : string Returns the Placehodler key
getPlaceholderString ( ) : string
getReplacement ( ) : string Has to return the placeholder with the corresponding value
getTestValue ( ) : string Has to return an appropriate value for a test replacement
getValue ( ) : mixed Returns the the value of the current Placeholder parameter
setContentString ( $contentString )
setDocument ( $document )
setLocale ( $locale = null ) Try to set the locale from different sources
setParams ( $params )
setPlaceholderConfig ( Zend_Config_Json $config )
setPlaceholderKey ( $key )
setPlaceholderString ( $string )

Method Details

getContentString() public method

returns the full content string
public getContentString ( ) : null | string
return null | string

getDocument() public method

Returns the Document
public getDocument ( ) : Document | null
return Pimcore\Model\Document | null

getEmptyValue() public method

Will be used as replacement if the passed parameter is empty
public getEmptyValue ( ) : string
return string

getLanguage() public method

Returns the current language
public getLanguage ( ) : string
return string

getLocale() public method

Returns the current locale
public getLocale ( ) : Zend_Locale
return Zend_Locale

getParam() public method

Returns a specific parameter
public getParam ( string $key ) : mixed
$key string
return mixed

getParams() public method

Returns the Parameters ob the Placeholder object
public getParams ( ) : array
return array

getPlaceholderConfig() public method

Returns the Placeholder config object
public getPlaceholderConfig ( ) : Zend_Config_Json
return Zend_Config_Json

getPlaceholderKey() public method

Returns the Placehodler key
public getPlaceholderKey ( ) : string
return string

getPlaceholderString() public method

public getPlaceholderString ( ) : string
return string

getReplacement() abstract public method

Has to return the placeholder with the corresponding value
abstract public getReplacement ( ) : string
return string

getTestValue() abstract public method

Has to return an appropriate value for a test replacement
abstract public getTestValue ( ) : string
return string

getValue() public method

Returns the the value of the current Placeholder parameter
public getValue ( ) : mixed
return mixed

setContentString() public method

public setContentString ( $contentString )
$contentString

setDocument() public method

public setDocument ( $document )
$document

setLocale() public method

Try to set the locale from different sources
public setLocale ( $locale = null )
$locale

setParams() public method

public setParams ( $params )
$params

setPlaceholderConfig() public method

public setPlaceholderConfig ( Zend_Config_Json $config )
$config Zend_Config_Json

setPlaceholderKey() public method

public setPlaceholderKey ( $key )
$key

setPlaceholderString() public method

public setPlaceholderString ( $string )
$string

Property Details

$contentString protected property

The Content as string
protected string $contentString
return string

$document protected property

The passed Document Object
protected Document,Pimcore\Model|null $document
return Pimcore\Model\Document | null

$locale protected property

protected Zend_Locale $locale
return Zend_Locale

$params protected property

All dynamic parameters which are passed to the Placeholder
protected array $params
return array

$placeholderConfig protected property

The config object passed from the placeholder If no config object was passed a empty \Zend_Config_Json is passed
protected Zend_Config_Json $placeholderConfig
return Zend_Config_Json

$placeholderKey protected property

The placeholder key passed to determine the dynamic parameter
protected string $placeholderKey
return string

$placeholderString protected property

The placeholder string e.g "%Object(object_id,{"method" : "getName"})"
protected string $placeholderString
return string