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;
 }
 /**
  * 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;
 }
 /**
  * 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;
 }
 public function process()
 {
     switch ($this->getLanguage()) {
     }
     return parent::process();
 }
예제 #5
0
 /**
  * @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
0
 /**
  * {@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();
 }
 /**
  * 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;
 }