本文整理汇总了PHP中modResource::process方法的典型用法代码示例。如果您正苦于以下问题:PHP modResource::process方法的具体用法?PHP modResource::process怎么用?PHP modResource::process使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类modResource
的用法示例。
在下文中一共展示了modResource::process方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
function process()
{
$this->_content = '';
$this->_output = '';
$this->xpdo->getParser();
/** @var modTemplate $baseElement */
if ($baseElement = $this->getOne('Template') and $baseElement->process()) {
$this->_content = $baseElement->_output;
$this->_processed = true;
} else {
return parent::process();
}
return $this->_content;
}
示例2: process
/**
* Overrides modResource::process to set the Response handler to
* {@link modXMLRPCResponse}
*
* {@inheritdoc}
*/
public function process()
{
$this->xpdo->getResponse('xmlrpc.modXMLRPCResponse');
parent::process();
return $this->_content;
}
示例3: process
/**
* Overrides modResource::process to provide a custom response
*
* @see modResource::process()
* @return string The processed content
*/
public function process()
{
$this->xpdo->getResponse('jsonrpc.modJSONRPCResponse');
parent::process();
return $this->_content;
}
示例4: process
public function process()
{
switch ($this->getLanguage()) {
}
return parent::process();
}
示例5: process
/**
* @return string
*/
public function process()
{
if ($this->privateweb && !$this->xpdo->hasPermission('ticket_view_private') && ($id = $this->getOption('tickets.private_ticket_page'))) {
$this->xpdo->sendForward($id);
die;
} else {
//$this->xpdo->setPlaceholders($this->getVirtualFields(), 'ticket_');
return parent::process();
}
}
示例6: process
/**
* {@inheritdoc}
*/
public function process()
{
/* @var msProductData $data */
if ($data = $this->getOne('Data')) {
/* @var miniShop2 $miniShop2 */
$miniShop2 = $this->xpdo->getService('minishop2');
$pls = $data->toArray();
$tmp = $pls['price'];
$pls['price'] = $this->getPrice($pls);
if ($pls['price'] != $tmp) {
$pls['old_price'] = $tmp;
}
$pls['price'] = $miniShop2->formatPrice($pls['price']);
$pls['old_price'] = $miniShop2->formatPrice($pls['old_price']);
$pls['weight'] = $miniShop2->formatWeight($this->getWeight($pls));
unset($pls['id']);
$this->xpdo->setPlaceholders($pls);
$this->loadOptions();
$this->xpdo->setPlaceholders($this->options);
}
/* @var msVendor $vendor */
if ($vendor = $this->getOne('Vendor')) {
$this->xpdo->setPlaceholders($vendor->toArray('vendor.'));
}
$this->xpdo->lexicon->load('minishop2:default');
$this->xpdo->lexicon->load('minishop2:cart');
$this->xpdo->lexicon->load('minishop2:product');
return parent::process();
}
示例7: process
/**
* Override modResource::process to set some custom placeholders for the Resource when rendering it in the front-end.
* {@inheritDoc}
* @return string
*/
public function process()
{
if ($this->isRss()) {
$this->set('template', 0);
$this->set('contentType', 'application/rss+xml');
/** @var modContentType $contentType */
$contentType = $this->xpdo->getObject('modContentType', array('mime_type' => 'application/rss+xml'));
if ($contentType) {
$this->set('content_type', $contentType->get('id'));
$this->xpdo->response->contentType = $contentType;
}
$this->_content = $this->getRssCall();
$maxIterations = intval($this->xpdo->getOption('parser_max_iterations', 10));
$this->xpdo->parser->processElementTags('', $this->_content, false, false, '[[', ']]', array(), $maxIterations);
$this->_processed = true;
$this->set('cacheable', false);
} else {
$this->xpdo->lexicon->load('articles:frontend');
$this->getPostListingCall();
$this->getArchivistCall();
$this->getTagListerCall();
$this->getLatestPostsCall();
$settings = $this->getContainerSettings();
if ($this->getOption('commentsEnabled', $settings, true)) {
$this->getLatestCommentsCall();
$this->xpdo->setPlaceholder('comments_enabled', 1);
} else {
$this->xpdo->setPlaceholder('comments_enabled', 0);
}
$this->_content = parent::process();
}
return $this->_content;
}