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


PHP Zend_View::addScriptPath方法代码示例

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


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

示例1: __construct

 /**
  *
  * @param string $charset
  */
 public function __construct($charset = 'UTF-8')
 {
     parent::__construct($charset);
     $this->view = Axis::app()->getBootstrap()->getResource('layout')->getView();
     $this->view->addScriptPath(Axis::config('system/path') . '/app/design/mail');
     $this->view->site = Axis::getSite()->name;
     $this->view->company = Axis::single('core/site')->getCompanyInfo();
 }
开发者ID:rguedes,项目名称:axiscommerce,代码行数:12,代码来源:Mail.php

示例2: 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

示例3: send

 /**
  * load the template and send the message
  *
  * @param string $recipient
  * @param array $from
  * @param string $subject
  * @param string $template
  * @param array $data
  * @param string $cc
  * @return bool
  */
 public function send($recipient, $from = array(), $subject, $message, $cc = false)
 {
     $config = Zend_Registry::get('config');
     $this->_view->addScriptPath($config->filepath->emailTemplates);
     $this->_view->emailBody = $message;
     $this->_mail->setBodyHtml($this->_view->render('template.phtml'));
     $this->_mail->setFrom($from[0], $from[1]);
     $this->_mail->addTo($recipient);
     if ($cc) {
         $this->_mail->addCc($cc);
     }
     $this->_mail->setSubject($subject);
     return $this->_mail->send($this->_transport);
 }
开发者ID:laiello,项目名称:digitalus-cms,代码行数:25,代码来源:Mail.php

示例4: _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

示例5: Show

 public function Show($parameters)
 {
     $output = "";
     $ns = new Zend_Session_Namespace();
     $languageID = Languages::get_language_id($ns->lang);
     $mainviewhelper = new Zend_View();
     $mainviewhelper->addBasePath(APPLICATION_PATH . '/modules/default/views/');
     $view = new Zend_View();
     $view->addScriptPath('../library/Shineisp/Custom/views');
     $translator = Shineisp_Registry::getInstance()->Zend_Translate;
     if (!empty($parameters['code'])) {
         $code = $parameters['code'];
     } else {
         return "";
     }
     // Get the products
     $data = Products::GetProductsByGroupCode($code, $languageID);
     // Check the existence of the mandatories attributes
     if (!empty($data['attributes'][0])) {
         $view->attributes = $data['attributes'];
     }
     // Check if there are values set for the group of the product selected
     if (!empty($data['attributes_values'][0])) {
         $view->values = $data['attributes_values'];
     }
     // Get the products
     if (!empty($data['products'][0])) {
         $view->products = $data['products'];
     }
     $view->mainviewhelper = $mainviewhelper;
     // Path of the template
     return $view->render('productsattributes.phtml');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:33,代码来源:Productlistattributes.php

示例6: 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

示例7: renderBlock

 /**
  * Method constructure
  * @param string $name
  * @param Zend_View $view 
  */
 public function renderBlock($name, $view, $params = array())
 {
     $controllerName = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
     $actionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
     $view->addScriptPath(APPLICATION_PATH . '/views/scripts/' . $controllerName . '/block');
     $this->_setViewByParams($view, $params);
     //set view
     return $view->render($name . '.phtml');
     //render view
 }
开发者ID:hocondoimeo,项目名称:giasu-tam.com,代码行数:15,代码来源:RenderBlock.php

示例8: Show

 public function Show($parameters)
 {
     $view = new Zend_View();
     $view->addScriptPath('../library/Shineisp/Custom/views');
     $ns = new Zend_Session_Namespace();
     $languageID = Languages::get_language_id($ns->lang);
     // Generate the xml file in the public path /documents
     Reviews::getXMLDataMap($languageID);
     return $view->render('reviewsmap.phtml');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:10,代码来源:ReviewsMap.php

示例9: _prepareView

 /**
  * Prepare view to be used
  *
  * @return void
  */
 private function _prepareView()
 {
     $defaultScriptPath = $this->getApplicationPath() . '/views/scripts/';
     if (!in_array($defaultScriptPath, $this->view->getScriptPaths())) {
         $this->view->addScriptPath($defaultScriptPath);
     }
     $defaultHelperPath = $this->getApplicationPath() . '/views/helpers/';
     if (!in_array($defaultHelperPath, $this->view->getHelperPaths())) {
         $this->view->addHelperPath($defaultHelperPath);
     }
 }
开发者ID:JellyBellyDev,项目名称:zle,代码行数:16,代码来源:Mvc.php

示例10: Show

 /**
  * Show the domain checker form
  */
 public function Show($parameters)
 {
     $view = new Zend_View();
     $form = new Default_Form_DomainsinglecheckerForm(array('action' => '/domainschk/check', 'method' => 'post'));
     $translator = Shineisp_Registry::getInstance()->Zend_Translate;
     $title = !empty($parameters['title']) ? $parameters['title'] : "Choose your new domain name!";
     $form->getElement('name')->setAttrib('title', $translator->translate($title));
     // Set the path of the view templates
     $view->addScriptPath('../library/Shineisp/Custom/views');
     $view->form = $form;
     return $view->render('domainchecker.phtml');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:15,代码来源:DomainChecker.php

示例11: init

 public function init()
 {
     $view = new Zend_View($this->getOptions());
     $view->addScriptPath(APPLICATION_PATH . '/scripts');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')->appendHttpEquiv('X-UA-Compatible', 'IE=EmulateIE7')->appendName('viewport', 'width=device-width; initial-scale=1.0;')->appendName('viewport', 'user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0');
     $view->headLink(array('rel' => 'shortcut bookmark icon', 'type' => 'image/x-icon', 'href' => '/branding/images/shared/pathbuilder.ico', 'PREPEND'))->appendStylesheet('/resources/css/reset.css')->appendStylesheet('/resources/css/base.css')->appendStylesheet('/branding/css/global.css');
     $view->headScript()->appendFile('/lib/core/jquery.min.js')->appendFile('/lib/core/base.js')->appendFile('/lib/core/templates.js')->appendFile('/lib/i10n/en.js');
     require_once 'default/forms/SearchHeader.php';
     $view->searchform = new Default_Form_SearchHeader();
     return $view;
 }
开发者ID:revoleers,项目名称:rewardimizer-server,代码行数:13,代码来源:View.php

示例12: resetView

 /**
  * Reset the view's script paths and set new ones
  * @todo: Move elsewhere - it shouldn't be in a service
  *
  * @param string $module
  * @param string $type
  */
 private function resetView($module, $type)
 {
     $module = ucfirst($module);
     $layout = Zend_Layout::getMvcInstance();
     // Reset view script paths
     $this->view->setScriptPath(null);
     // Build new ones for blocks
     $this->view->addBasePath(ZfApplication::$_base_path . "/app/" . ucfirst($module) . "/views", ucfirst($module) . "_View");
     $this->view->addScriptPath(ZfApplication::$_base_path . "/app/Content/views/scripts/{$type}");
     $this->view->addScriptPath(ZfApplication::$_base_path . "/app/" . ucfirst($module) . "/views/scripts/{$type}");
     $this->view->addScriptPath($layout->getLayoutPath() . "default/templates/" . ucfirst($module) . "/{$type}");
     $this->view->addScriptPath($layout->getLayoutPath() . $layout->getLayout() . "/templates/" . ucfirst($module) . "/{$type}");
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:20,代码来源:Content.php

示例13: send

 public function send()
 {
     $config = Zend_Registry::get('config');
     $mail = new Zend_Mail('utf-8');
     $mail->setSubject('Bericht via de website van ' . $config->company->name)->setFrom($this->getEmail(), $this->getName() . ' ' . $this->getFirstName());
     $view = new Zend_View();
     $view->assign('contact', $this);
     $view->assign('config', $config);
     $view->addScriptPath(APPLICATION_PATH . '/modules/default/views/scripts');
     $body = $view->render('/contact/_mailMessage.phtml');
     $mail->setBodyHtml($body);
     $mail->addTo($config->contact->to);
     return $mail->send();
 }
开发者ID:sonvq,项目名称:2015_freelance6,代码行数:14,代码来源:Contact.php

示例14: Show

 public function Show($parameters)
 {
     $view = new Zend_View();
     $view->addScriptPath('../library/Shineisp/Custom/views');
     $limit = 5;
     $ns = new Zend_Session_Namespace();
     $languageID = Languages::get_language_id($ns->lang);
     $translator = Shineisp_Registry::getInstance()->Zend_Translate;
     if (!empty($parameters['limit']) && is_numeric($parameters['limit'])) {
         $limit = $parameters['limit'];
     }
     $view->data = Reviews::get_random($limit);
     return $view->render('reviewslist.phtml');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:14,代码来源:Reviewslist.php

示例15: _initDoctype

 protected function _initDoctype()
 {
     ///$this->bootstrap('view');
     // $view = $this->getResource('view');
     //  $view->doctype('XHTML1_STRICT');
     //enable class autoloader start
     require_once 'Zend/Loader/Autoloader.php';
     $loader = Zend_Loader_Autoloader::getInstance();
     $loader->setFallbackAutoloader(true);
     //enable class autoloader end
     $frontCtrl = Zend_Controller_Front::getInstance();
     $frontCtrl->throwExceptions(true);
     $frontCtrl->addModuleDirectory(APPLICATION_PATH . '/modules');
     //set include path for modules
     set_include_path(get_include_path() . PATH_SEPARATOR . APPLICATION_PATH . '/modules/');
     $config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/config.xml', 'production');
     //set database adaptor
     $db = Zend_Db::factory('PDO_MYSQL', $config->resources->db->params);
     Zend_Registry::set('db', $db);
     //cache setting start
     if ($config->configuration->cache) {
         $frontend = array('lifetime' => 200, 'cache_id_prefix' => 'site_', 'automatic_seralization' => true);
         $backend = array('cache_dir' => APPLICATION_PATH . '/../cache');
         $cache = Zend_Cache::factory('Page', 'File', $frontend, $backend);
         Zend_Registry::set('cache', $cache);
         $cache->start(md5($_SERVER['REQUEST_URI']));
     }
     $theme = 'default';
     if (isset($config->configuration->theme)) {
         $theme = $config->configuration->theme;
     }
     //theme layout path
     $layoutPath = APPLICATION_PATH . '/../public/themes/' . $theme . '/templates';
     //get module name
     $arrUrl = array_filter(explode("/", str_replace($config->configuration->base_path, '', $_SERVER['REQUEST_URI'])));
     $moduleName = current($arrUrl);
     $modules = array_keys($frontCtrl->getControllerDirectory());
     $moduleName = in_array($moduleName, $modules) ? $moduleName : 'default';
     $layout = Zend_Layout::startMvc()->setLayout('layout')->setLayoutPath($layoutPath)->setContentKey('content');
     //set view render
     $view = new Zend_View();
     $view->addBasePath($layoutPath . "/" . $moduleName);
     $view->addScriptPath($layoutPath . "/" . $moduleName);
     $view->doctype('XHTML1_STRICT');
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
 }
开发者ID:rashmigandhe,项目名称:HHMobile,代码行数:48,代码来源:Bootstrap.php


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