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


PHP Phprojekt_Loader::loadViewScript方法代码示例

本文整理汇总了PHP中Phprojekt_Loader::loadViewScript方法的典型用法代码示例。如果您正苦于以下问题:PHP Phprojekt_Loader::loadViewScript方法的具体用法?PHP Phprojekt_Loader::loadViewScript怎么用?PHP Phprojekt_Loader::loadViewScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Phprojekt_Loader的用法示例。


在下文中一共展示了Phprojekt_Loader::loadViewScript方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setCustomBody

 /**
  * Sets the body of the email according to the data received from Notification class
  *
  * @param array       $params  Array with options.
  * @param array       $fields  Array with the fields of the model.
  * @param array       $changes Array with changes done in the model.
  * @param Zend_Locale $lang Locale for use in translations.
  *
  * @return void
  */
 public function setCustomBody($params, $fields, $changes, $lang)
 {
     $phproject = Phprojekt::getInstance();
     $view = $phproject->getView();
     $view->mainFields = $fields;
     if ($changes !== null) {
         $view->changes = $changes;
     }
     $view->title = $phproject->translate('A', $lang) . " " . '"' . $phproject->translate($params['moduleTable'], $lang) . '" ' . $phproject->translate('item has been', $lang) . " " . $phproject->translate($params['actionLabel'], $lang);
     $view->currentData = $phproject->translate('Current data', $lang);
     $view->changesDone = $phproject->translate('Changes done', $lang);
     $view->field = $phproject->translate('Field', $lang);
     $view->oldValue = $phproject->translate('Old value', $lang);
     $view->copyright = Phprojekt::COPYRIGHT;
     $view->url = $params['url'];
     if ($this->_bodyMode == self::MODE_TEXT) {
         $view->endOfLine = $this->getEndOfLine();
     }
     Phprojekt_Loader::loadViewScript();
     $body = $view->render('mail' . $this->_bodyMode . '.phtml');
     switch ($this->_bodyMode) {
         case self::MODE_TEXT:
         default:
             $this->setBodyText($body);
             break;
         case self::MODE_HTML:
             $this->setBodyHtml($body);
             break;
     }
 }
开发者ID:penSecIT,项目名称:PHProjekt,代码行数:40,代码来源:Mail.php

示例2: _getHtmlList

 /**
  * Returns a string with HTML representing the minutes data.
  *
  * @param Minutes_Models_Minutes $minutes Minutes object to use for data.
  *
  * @return string HTML representation of minutes data.
  */
 private function _getHtmlList(Phprojekt_Model_Interface $minutes)
 {
     $items = $minutes->items->fetchAll();
     $translate = Phprojekt::getInstance()->getTranslate();
     $newitem = array();
     foreach ($items as $item) {
         $data = array();
         $data['topicId'] = $this->view->escape($item->topicId);
         $data['topicType'] = $this->view->escape($item->information->getTopicType($item->topicType));
         $data['display'] = nl2br($this->view->escape($item->getDisplay()));
         $newitem[] = $data;
     }
     $this->view->items = $newitem;
     $this->view->title = $this->view->escape($minutes->title);
     $this->view->description = nl2br($this->view->escape($minutes->description));
     $this->view->txtNo = $translate->translate('No.');
     $this->view->txtType = $translate->translate('Type');
     $this->view->txtItem = $translate->translate('Item');
     Phprojekt_Loader::loadViewScript($this->view);
     return $this->view->render('table.phtml');
 }
开发者ID:joerch,项目名称:PHProjekt,代码行数:28,代码来源:IndexController.php


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