当前位置: 首页>>代码示例>>PHP>>正文


PHP modResource::process方法代码示例

本文整理汇总了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;
 }
开发者ID:Tramp1357,项目名称:atlasorg,代码行数:14,代码来源:phptemplateresource.class.php

示例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;
 }
开发者ID:ChrstnMgcn,项目名称:revolution,代码行数:12,代码来源:modxmlrpcresource.class.php

示例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;
 }
开发者ID:semencov-com,项目名称:affiliate,代码行数:12,代码来源:modjsonrpcresource.class.php

示例4: process

 public function process()
 {
     switch ($this->getLanguage()) {
     }
     return parent::process();
 }
开发者ID:bendasvadim,项目名称:modTranslatedDocument,代码行数:6,代码来源:modtranslateddocument.class.php

示例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();
     }
 }
开发者ID:soulcreate,项目名称:Tickets,代码行数:13,代码来源:ticket.class.php

示例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();
 }
开发者ID:Vitaliz,项目名称:miniShop2,代码行数:32,代码来源:msproduct.class.php

示例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;
 }
开发者ID:raadhuis,项目名称:modx-basic,代码行数:38,代码来源:articlescontainer.class.php


注:本文中的modResource::process方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。