示例#1
0
文件: User.php 项目: jewelhuq/fraym
 /**
  * @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
文件: News.php 项目: jewelhuq/fraym
 /**
  * @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:');
 }