當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_View::addHelperPath方法代碼示例

本文整理匯總了PHP中Zend_View::addHelperPath方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_View::addHelperPath方法的具體用法?PHP Zend_View::addHelperPath怎麽用?PHP Zend_View::addHelperPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_View的用法示例。


在下文中一共展示了Zend_View::addHelperPath方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 protected function setUp()
 {
     $this->_picker = new Zle_Form_Element_DatePicker('foo');
     $this->_view = new Zend_View();
     $this->_view->addHelperPath(realpath(dirname(__FILE__) . '/../../../../library/Zle/View/Helper'), 'Zle_View_Helper');
     ZendX_JQuery::enableView($this->_view);
 }
開發者ID:JellyBellyDev,項目名稱:zle,代碼行數:7,代碼來源:DatePickerTest.php

示例2: _initView

 public function _initView()
 {
     // Initialize view
     $view = new Zend_View();
     // Setup Helper Paths
     $view->setHelperPath(SM_LIB . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . 'Helper', 'Smallunch_lib_View_Helper');
     // Add Global Helper path (typically application/helpers
     $view->addHelperPath(GLOBAL_HELPER_DIR . DIRECTORY_SEPARATOR . 'View');
     // add per application helper path (typically application/(backend, frontend)/helpers
     $view->addHelperPath(APPLICATION_DIRECTORY . DIRECTORY_SEPARATOR . 'Helper' . DIRECTORY_SEPARATOR . 'View');
     // Setup layout
     if (isset($this->config->layout->doctype)) {
         $view->doctype($this->config->layout->doctype);
     }
     if (isset($this->config->default->title)) {
         $view->headTitle($this->config->default->title);
     }
     if (isset($this->config->default->meta_keywords)) {
         $view->headMeta($this->config->default->meta_keywords, 'keywords');
     }
     if (isset($this->config->default->meta_description)) {
         $view->headMeta($this->config->default->meta_description, 'description');
     }
     if (isset($this->config->layout->charset)) {
         $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=' . $this->config->layout->charset);
     }
     if (isset($this->config->layout->content_language)) {
         $view->headMeta()->appendHttpEquiv('Content-Language', $this->config->layout->content_language);
     }
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     // Return it, so that it can be stored by the bootstrap
     return $view;
 }
開發者ID:jeremymoorecom,項目名稱:Smallunch,代碼行數:35,代碼來源:Bootstrap.php

示例3: _initView

 protected function _initView()
 {
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $view->headTitle('Truffes');
     $view->headLink()->appendStylesheet('/css/main.css');
     $view->addHelperPath(APPLICATION_PATH . '/helpers', 'View_Helper');
     $view->addHelperPath(APPLICATION_PATH . '/modules/frontend/views/helpers', 'View_Helper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     return $view;
 }
開發者ID:esandre,項目名稱:CoeurDeTruffes,代碼行數:12,代碼來源:Bootstrap.php

示例4: _initHelper

 protected function _initHelper()
 {
     $lib_path = APPLICATION_PATH . "/lib";
     $view = new Zend_View();
     $view->addHelperPath("Cible/View/Helper", "Cible_View_Helper");
     $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
     $view->addBasePath("{$lib_path}/Cible/View");
     $view->addBasePath("{$lib_path}/ZendX/JQuery/View");
     $view->addBasePath("{$lib_path}/Cible/Validate");
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
 }
開發者ID:anunay,項目名稱:stentors,代碼行數:13,代碼來源:Cron.php

示例5: _initView

 protected function _initView()
 {
     $view = new Zend_View();
     $view->doctype('XHTML1_TRANSITIONAL');
     $view->headMeta()->appendHttpEquiv('Content-type', 'text/html;charset=utf-8');
     $view->headTitle('· Intermodels · Un deseo...hecho realidad · Modelos · Gogós · Azafatas · Agencia · Barcelona ·')->setSeparator(' - ');
     $view->headScript()->prependFile('http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js');
     $view->addHelperPath('Neo/View/Helper', 'Neo_View_Helper');
     $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     return $view;
 }
開發者ID:Neozeratul,項目名稱:Intermodels,代碼行數:13,代碼來源:Bootstrap.php

示例6: _initView

 protected function _initView()
 {
     $path = APPLICATION_PATH . '/modules/' . MODULE_NAME . '/views';
     $view = new Zend_View();
     $view->setUseStreamWrapper(true);
     $view->setEncoding('UTF-8');
     $view->addScriptPath($path . '/partials');
     $view->addScriptPath($path . '/scripts');
     $view->addHelperPath(APPLICATION_PATH . '/../library/Bbx/View/Helper', 'Bbx_View_Helper');
     $view->addHelperPath($path . '/helpers', 'ViewHelper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     Zend_Registry::set('view', $view);
 }
開發者ID:rdallasgray,項目名稱:bbx,代碼行數:14,代碼來源:ContextDependencies.php

示例7: getView

 /**
  * Get view
  * 
  * @return Zend_View 
  */
 protected function getView()
 {
     if (!isset(self::$renderView)) {
         //init view
         self::$renderView = new Zend_View();
         self::$renderView->setScriptPath(APPLICATION_PATH . "/modules/teaser/views/scripts/templates/");
         self::$renderView->addHelperPath(APPLICATION_PATH . "/modules/teaser/views/helpers/", "Teaser_View_Helper");
         $mvcView = Zend_Layout::getMvcInstance()->getView();
         if (isset($mvcView->theme)) {
             self::$renderView->addScriptPath(APPLICATION_PATH . '/../themes/' . $mvcView->theme . '/views/teaser/templates/');
         }
     }
     return self::$renderView;
 }
開發者ID:bokultis,項目名稱:kardiomedika,代碼行數:19,代碼來源:RenderTeaser2.php

示例8: _initViewHelpers

 protected function _initViewHelpers()
 {
     $view = new Zend_View();
     $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
     $view->jQuery()->addStylesheet($view->baseUrl . '/js/jquery/css/ui-lightness/jquery-ui-1.8.13.custom.css');
     $view->jQuery()->setLocalPath($view->baseUrl . '/js/jquery/js/jquery-1.5.1.min.js');
     $view->jQuery()->setUiLocalPath($view->baseUrl . '/js/jquery/js/jquery-ui-1.8.13.custom.min.js');
     $view->jQuery()->enable();
     $view->jQuery()->uiEnable();
     $view->addHelperPath("ZendX/Core/ViewHelper/Html", "ZendX_Core_ViewHelper_Html");
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
     return $view;
 }
開發者ID:nainit-virtueinfo,項目名稱:zend-rest,代碼行數:15,代碼來源:Bootstrap.php

示例9: _sendNewCommentEmail

 /**
  * Send email notification to moderators when a new comment is posted
  * 
  * @todo move logic to model / library class
  * 
  * @param HumanHelp_Model_Comment $comment
  * @param HumanHelp_Model_Page $page
  */
 public function _sendNewCommentEmail(HumanHelp_Model_Comment $comment, HumanHelp_Model_Page $page)
 {
     $config = Zend_Registry::get('config');
     $emailTemplate = new Zend_View();
     $emailTemplate->setScriptPath(APPLICATION_PATH . '/views/emails');
     $emailTemplate->addHelperPath(APPLICATION_PATH . '/views/helpers', 'HumanHelp_View_Helper_');
     $emailTemplate->setEncoding('UTF-8');
     $emailTemplate->comment = $comment;
     $emailTemplate->page = $page;
     $emailTemplate->baseUrl = 'http://' . $_SERVER['HTTP_HOST'] . $this->view->baseUrl;
     $bodyHtml = $emailTemplate->render('newComment.phtml');
     $bodyText = $emailTemplate->render('newComment.ptxt');
     $mail = new Zend_Mail();
     $mail->setType(Zend_Mime::MULTIPART_ALTERNATIVE)->setBodyHtml($bodyHtml, 'UTF-8')->setBodyText($bodyText, 'UTF-8')->setSubject("New comment on '{$page->getTitle()}' in '{$page->getBook()->getTitle()}'")->setFrom($config->fromAddress, $config->fromName);
     if (is_object($config->notifyComments)) {
         foreach ($config->notifyComments->toArray() as $rcpt) {
             $mail->addTo($rcpt);
         }
     } else {
         $mail->addTo($config->notifyComments);
     }
     if ($config->smtpServer) {
         $transport = new Zend_Mail_Transport_Smtp($config->smtpServer, $config->smtpOptions->toArray());
     } else {
         $transport = new Zend_Mail_Transport_Sendmail();
     }
     $mail->send($transport);
 }
開發者ID:shevron,項目名稱:HumanHelp,代碼行數:36,代碼來源:IndexController.php

示例10: __construct

 public function __construct($options, $seotoasterData)
 {
     // setting up Seotoaster data and plugin options
     $this->_options = $options;
     $this->_seotoasterData = $seotoasterData;
     // setting up helpers
     $this->_sessionHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('session');
     $this->_websiteHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('website');
     $this->_responseHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('response');
     $this->_redirector = new Zend_Controller_Action_Helper_Redirector();
     // setting up request and response objects
     $front = Zend_Controller_Front::getInstance();
     $this->_request = $front->getRequest();
     $this->_response = $front->getResponse();
     unset($front);
     // setting up view
     $this->_view = new Zend_View();
     $this->_websiteUrl = $this->_websiteHelper->getUrl();
     $this->_pluginName = strtolower(__CLASS__);
     $this->_view->websiteUrl = $this->_websiteUrl;
     $this->_view->pluginName = $this->_pluginName;
     // setting up view helpers (standart and ZendX)
     $this->_view->setHelperPath(APPLICATION_PATH . '/views/helpers/');
     $this->_view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
     // runing init routines
     $this->_initAcl();
     $this->_initTranslator();
     $this->_init();
 }
開發者ID:PavloKovalov,項目名稱:seotoaster,代碼行數:29,代碼來源:Abstract.php

示例11: _initView

 /**
  * Fungsi untuk inisialisasi view
  */
 protected function _initView()
 {
     // Initialize view
     $view = new Zend_View();
     /* ZendX_JQuery::enableView($view);
     
               $view->addHelperPath('ZendX/JQuery/View/Helper',
               'ZendX_JQuery_View_Helper'); */
     $view->addHelperPath(APPLICATION_PATH . '/../library/Budpar/View/Helper/', 'Budpar_View_Helper');
     $view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'View_Helper');
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     // Return it, so that it can be stored by the bootstrap
     return $view;
 }
開發者ID:abdulhadikaryana,項目名稱:kebudayaan,代碼行數:19,代碼來源:Bootstrap.php

示例12: initView

 private function initView()
 {
     $view = new Zend_View();
     $view->addHelperPath(APPLICATION_PATH . '/../library/EasyCMS/View/Helper', 'EasyCMS_View_Helper');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
 }
開發者ID:robinmbarnes,項目名稱:EasyCMS,代碼行數:7,代碼來源:Bootstrap.php

示例13: getView

 public function getView()
 {
     require_once 'Zend/View.php';
     $view = new Zend_View();
     $view->addHelperPath('ZendX/MooTools/View/Helper/', 'ZendX_MooTools_View_Helper');
     return $view;
 }
開發者ID:benjamingb,項目名稱:ZendX_MooTools,代碼行數:7,代碼來源:MooToolsTest.php

示例14: getView

 public function getView()
 {
     // require_once 'Zend/View.php';
     $view = new Zend_View(array('encoding' => 'UTF-8'));
     $view->addHelperPath(dirname(__FILE__) . '/../../../../library/Zend/View/Helper');
     return $view;
 }
開發者ID:netvlies,項目名稱:zf,代碼行數:7,代碼來源:SelectTest.php

示例15: getView

 public function getView()
 {
     $view = new Zend_View();
     $view->addHelperPath(dirname(__FILE__) . '/../../../../library/Zend/View/Helper');
     $view->addScriptPath(dirname(__FILE__) . '/../_files/views/');
     return $view;
 }
開發者ID:ThorstenSuckow,項目名稱:conjoon,代碼行數:7,代碼來源:ViewScriptTest.php


注:本文中的Zend_View::addHelperPath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。