The Text Placeholder is used to replace the placeholder with the passed value.
| key |
string |
| value |
string |
| config available |
no |
Example Usage:
public function textPlaceholderAction(){ $this->disableViewAutoRender(); $text = 'Hello %Text(firstName); %Text(lastName);!'; $placeholder = new Pimcore_Placeholder(); $params = array('firstName' => 'Bart', 'lastName' => 'Simpson'); $replaced = $placeholder->replacePlaceholders($text, $params); echo $replaced; //Will be: Hello Bart Simpson! }