本文整理汇总了PHP中modX::unsetPlaceholders方法的典型用法代码示例。如果您正苦于以下问题:PHP modX::unsetPlaceholders方法的具体用法?PHP modX::unsetPlaceholders怎么用?PHP modX::unsetPlaceholders使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类modX
的用法示例。
在下文中一共展示了modX::unsetPlaceholders方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
/**
* Process the template variable and return the output.
*
* {@inheritdoc}
*/
public function process($properties = null, $content = null)
{
parent::process($properties, $content);
if (!$this->_processed) {
$this->_content = $this->renderOutput($this->xpdo->resourceIdentifier);
/* copy the content source to the output buffer */
$this->_output = $this->_content;
if (is_string($this->_output) && !empty($this->_output)) {
/* turn the processed properties into placeholders */
$scope = $this->xpdo->toPlaceholders($this->_properties, '', '.', true);
/* collect element tags in the content and process them */
$maxIterations = intval($this->xpdo->getOption('parser_max_iterations', null, 10));
$this->xpdo->parser->processElementTags($this->_tag, $this->_output, $this->xpdo->parser->isProcessingUncacheable(), $this->xpdo->parser->isRemovingUnprocessed(), '[[', ']]', array(), $maxIterations);
/* remove the placeholders set from the properties of this element and restore global values */
if (isset($scope['keys'])) {
$this->xpdo->unsetPlaceholders($scope['keys']);
}
if (isset($scope['restore'])) {
$this->xpdo->toPlaceholders($scope['restore']);
}
}
/* apply output filtering */
$this->filterOutput();
/* cache the content */
$this->cache();
$this->_processed = true;
}
$this->xpdo->parser->setProcessingElement(false);
/* finally, return the processed element content */
return $this->_output;
}
示例2: unsetPlaceholders
/**
* @param $keys
*/
public function unsetPlaceholders($keys)
{
$this->modx->unsetPlaceholders($keys);
}