Пример #1
0
 /**
  * @param $xml
  * @return string
  */
 public function execBlock($xml)
 {
     if ((string) $xml->view === 'login-logout') {
         return $this->userController->renderForm($xml);
     }
     $this->template->setTemplate("string:");
 }
Пример #2
0
 /**
  * @param $xml
  * @return bool|mixed|string
  */
 private function setBlockTemplateWrap($xml)
 {
     $templateContent = $this->getBlockTemplateString($xml);
     if (empty($templateContent)) {
         $this->template->setTemplate();
     } else {
         $this->template->setTemplate('string:' . $templateContent);
     }
     return $this->template->fetch();
 }
Пример #3
0
 /**
  * @param $xml
  * @return mixed
  */
 public function execBlock($xml)
 {
     $currentNewsItem = $this->getCurrentNewsItem();
     if ((string) $xml->view === 'list' && (!$currentNewsItem || (string) $xml->forceShowOnDetail == '1')) {
         return $this->newsList($xml);
     }
     if (in_array((string) $xml->view, array('list-category', 'list-tag'))) {
         return $this->listFilter($xml);
     } elseif (in_array((string) $xml->view, array('detail-category', 'detail-tag', 'detail')) && $currentNewsItem) {
         return $this->newsDetail($xml, $currentNewsItem);
     }
     $this->template->setTemplate('string:');
 }