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


PHP Zend_View::headScript方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     $view = new Zend_View();
     $view->headScript()->appendFile('/js/jquery.mousewheel-3.0.6.pack.js');
     $view->headScript()->appendFile('/js/jquery.fancybox.js?v=2.1.0');
     $view->headLink()->appendStylesheet('/js/jquery.fancybox.css?v=2.1.0');
     $txtSearch = $this->_getParam('txtSearch', '');
     $where = '';
     if ($txtSearch) {
         $where = ' name like "%' . $txtSearch . '%"';
     }
     $rowPerPage = $this->_getParam('rowperpage', 20);
     $currentPage = 1;
     $page = $this->_getParam('page', 1);
     if (!empty($page)) {
         $currentPage = $page;
     }
     $clients = new Default_Model_ClientsMapper();
     $listClients = $clients->getListClient($where);
     $paginator = Zend_Paginator::factory($listClients);
     $paginator->setItemCountPerPage($rowPerPage);
     $paginator->setCurrentPageNumber($currentPage);
     $this->view->paginator = $paginator;
     $this->view->txtSearch = $txtSearch;
 }
开发者ID:alienpham,项目名称:resume-manager,代码行数:25,代码来源:ClientsController.php

示例2: indexAction

 public function indexAction()
 {
     $view = new Zend_View();
     $view->headScript()->appendFile('/js/jquery.mousewheel-3.0.6.pack.js');
     $view->headScript()->appendFile('/js/jquery.fancybox.js?v=2.1.0');
     $view->headLink()->appendStylesheet('/js/jquery.fancybox.css?v=2.1.0');
     $company = new Default_Model_CompanyMapper();
     $rowPerPage = $this->_getParam('rowperpage', 20);
     $currentPage = 1;
     $page = $this->_getParam('page', 1);
     if (!empty($page)) {
         $currentPage = $page;
     }
     $txtSearch = $this->_getParam('txtSearch', '');
     $opt = $this->_getParam('opt', 'company_name');
     $sort = $this->_getParam('sort', 'created_date');
     $order = $this->_getParam('order', 'DESC');
     $where = '';
     if ($txtSearch) {
         $where = $opt . ' like "%' . $txtSearch . '%"';
     }
     $order1 = ' ORDER BY ' . $sort . ' ' . $order;
     $rows = $company->getListCompany($where, $order1);
     $paginator = Zend_Paginator::factory($rows);
     $paginator->setItemCountPerPage($rowPerPage);
     $paginator->setCurrentPageNumber($currentPage);
     $this->view->paginator = $paginator;
     $this->view->txtSearch = $txtSearch;
     $this->view->opt = $opt;
     $this->view->sort = $sort;
     $this->view->order = $order;
 }
开发者ID:alienpham,项目名称:resume-manager,代码行数:32,代码来源:CompanyController.php

示例3: filter

 /**
  * Injects additional scripts and styles,
  * that was linked to headScript after it was outputed
  * This method allows to call scripts from Axis_Box
  *
  * @param string $pageOutput
  */
 public function filter($pageOutput)
 {
     $head = substr($pageOutput, 0, strpos($pageOutput, '</head>'));
     if (empty($head)) {
         return $pageOutput;
     }
     $pageOutput = str_replace(array('{{headStyle}}', '{{headLink}}', '{{headScript}}'), array($this->_view->headStyle()->toString(), $this->_view->headLink()->toString(), $this->_view->headScript()->toString()), $pageOutput);
     return $pageOutput;
 }
开发者ID:baisoo,项目名称:axiscommerce,代码行数:16,代码来源:Placeholder.php

示例4: setHeadScripts

 /**
  * Set <script> elements
  *
  * @return void
  */
 public function setHeadScripts()
 {
     foreach ($this->getOptions() as $headScript => $options) {
         $mode = array_key_exists('mode', $options) && isset($options['mode']) ? $options['mode'] : 'FILE';
         $spec = array_key_exists('spec', $options) && isset($options['spec']) ? $options['spec'] : null;
         $placement = array_key_exists('placement', $options) && isset($options['placement']) ? $options['placement'] : 'APPEND';
         $this->_view->headScript($mode, $spec, $placement);
     }
 }
开发者ID:rockett,项目名称:parables,代码行数:14,代码来源:Headscripts.php

示例5:

 function _initView()
 {
     $view = new Zend_View();
     $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset = utf-8');
     $view->headLink()->appendStylesheet(HOST_PROJECT . "/public/css/bootstrap.min.css");
     $view->headLink()->offsetSetStylesheet("2", HOST_PROJECT . "/public/css/bootstrap-theme.css");
     $view->headLink()->offsetSetStylesheet("3", HOST_PROJECT . "/public/css/style.css");
     $view->headScript()->appendFile(HOST_PROJECT . "/public/js/jquery-1.11.3.min.js");
     $view->headScript()->offsetSetFile("2", HOST_PROJECT . "/public/js/bootstrap.min.js");
     $view->headScript()->offsetSetFile("3", HOST_PROJECT . "/public/js/myscript.js");
 }
开发者ID:LongNguyen-51101909,项目名称:Zend1Example,代码行数:11,代码来源:Bootstrap.php

示例6: _initView

 protected function _initView()
 {
     $options = $this->getOption('resources');
     if (isset($options['view'])) {
         $view = new Zend_View($options['view']);
     } else {
         $view = new Zend_View();
     }
     if (isset($options['view']['doctype'])) {
         $view->doctype($options['view']['doctype']);
     }
     if (isset($options['view']['contentType'])) {
         $view->headMeta()->appendHttpEquiv('Content-Type', $options['view']['contentType']);
     }
     /**
      * Default Title
      */
     $view->headTitle('IPMCore')->setSeparator(' - ');
     $rev = $options['view']['version'];
     /**
      * JavaScript. Also see Layout.phtml in app/layouts
      */
     $view->headScript()->appendFile('/js/jslibs.js', 'text/javascript')->appendFile('/js/ipmc/ipmcore.scripts_' . $rev . '.js', 'text/javascript');
     /**
      * CSS. Also see Layout.phtml in app/layouts
      */
     $view->headLink()->appendStylesheet('/css/print_' . $rev . '.css', 'print')->appendStylesheet('/css/screen_' . $rev . '.css', 'screen, projection')->appendStylesheet('/css/ie_' . $rev . '.css', 'screen, projection', 'IE')->appendStylesheet('/css/ipmcore_' . $rev . '.css');
     if (APPLICATION_ENV != 'production') {
         Zend_Registry::set('version', $options['view']['version']);
     }
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     return $view;
 }
开发者ID:Tony133,项目名称:zf-web,代码行数:34,代码来源:Bootstrap.php

示例7: postDispatch

 /**
  * postDispatch
  *
  * @param  Zend_Controller_Request_Abstract $oRequest
  * @return void
  */
 public function postDispatch(Zend_Controller_Request_Abstract $oRequest)
 {
     // Vars
     $module = $oRequest->getModuleName();
     $controller = $oRequest->getControllerName();
     $action = $oRequest->getActionName();
     // Auto include action css/js
     // @todo Include css/js from alternative directories if public folder for the theme
     //       is founded in other folder
     $jsFind = false;
     $publicPath = ROOT_PATH . $this->_frontOptions['publicDir'];
     foreach ($this->_themes as $theme) {
         $themePath = '/themes/' . $theme;
         if ($module == "default") {
             $cssUri = $themePath . "/controllers/{$controller}/{$action}.css";
             $jsUri = $themePath . "/controllers/{$controller}/{$action}.js";
         } else {
             $cssUri = $themePath . "/modules/{$module}/{$controller}/{$action}.css";
             $jsUri = $themePath . "/modules/{$module}/{$controller}/{$action}.js";
         }
         if (is_file($publicPath . "/" . $cssUri)) {
             $this->_view->headLink()->appendStylesheet($this->_view->baseUrl($cssUri));
         }
         if (is_file($publicPath . "/" . $jsUri) and !$jsFind) {
             $this->_view->headScript()->appendFile($this->_view->baseUrl($jsUri));
             $jsFind = true;
         }
     }
 }
开发者ID:BGCX261,项目名称:zlayer-svn-to-git,代码行数:35,代码来源:CssJs.php

示例8: postDispatch

 public function postDispatch(Zend_Controller_Request_Abstract $p_request)
 {
     // stick the baseUrl to the basePath because we have a dispatched request now
     // and format those god damn slashes!!
     $baseUrl = trim(Zend_Controller_Front::getInstance()->getBaseUrl(), '/');
     $currentUrn = ($baseUrl != "" ? '/' . $baseUrl : "") . '/' . trim($this->_baseUrn, '/') . '/';
     $filesToAppend = array("{$this->_basePath}{$this->_sharedFileName}.{$this->_fileSuffix}" => "{$currentUrn}{$this->_sharedFileName}.{$this->_fileSuffix}", 'script' => $this->view->jQueryReady()->toString(), "{$this->_basePath}{$p_request->getControllerName()}.{$this->_fileSuffix}" => "{$currentUrn}{$p_request->getControllerName()}.{$this->_fileSuffix}", "{$this->_basePath}{$p_request->getControllerName()}" . DIR_SEP . "{$p_request->getActionName()}.{$this->_fileSuffix}" => "{$currentUrn}{$p_request->getControllerName()}" . '/' . "{$p_request->getActionName()}.{$this->_fileSuffix}");
     foreach ($filesToAppend as $path => $urn) {
         if ($path == 'script') {
             $this->view->headScript()->appendScript($urn);
         }
         if ($this->_basePath && file_exists($path)) {
             $this->view->headScript()->appendFile($urn);
         }
     }
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:16,代码来源:Js.php

示例9: _responseHtml

 /**
  * _responseHtml
  *
  * @return void
  */
 private function _responseHtml()
 {
     $body = $this->_viewRenderer->getResponse()->getBody();
     $respHeader = "{$this->_view->doctype()}\n        <html>\n        <head>\n        {$this->_view->headMeta()}\n        {$this->_view->headTitle()}\n        {$this->_view->headStyle()}\n        {$this->_view->headLink()}\n        {$this->_view->headScript()}\n        {$this->_view->dojo()}\n        </head>";
     $respBody = "<body>{$body}</body>";
     $respFooter = "</html>";
     $this->_viewRenderer->getResponse()->setBody($respHeader . $respBody . $respFooter);
 }
开发者ID:BGCX261,项目名称:zlayer-svn-to-git,代码行数:13,代码来源:Abstract.php

示例10: init

 /**
  * (non-PHPdoc)
  * @see library/Zend/Controller/Zend_Controller_Action::init()
  */
 public function init()
 {
     $aNamespace = new Zend_Session_Namespace('zs_User');
     if (!isset($aNamespace->islogin)) {
         $this->_redirect('/user');
     }
     /* Initialize action controller here */
     $view = new Zend_View();
     //$view->headLink()->appendStylesheet ( '/css/stylesheet.css' );
     //$view->headScript()->appendFile ( '/js/jquery-1.8.0.min.js' );
     $view->headLink()->appendStylesheet('/js/themes/base/jquery.ui.all.css');
     $view->headScript()->appendFile('/js/jquery.ui.datepicker.js');
     $view->headScript()->appendFile('/js/jquery.ui.core.js');
     $this->view->username = $aNamespace->username;
     $this->view->fullname = $aNamespace->fullname;
     $this->view->isAdmin = $aNamespace->isAdmin;
     date_default_timezone_set('Asia/Ho_Chi_Minh');
 }
开发者ID:alienpham,项目名称:resume-manager,代码行数:22,代码来源:ProfileController.php

示例11: init

 public function init()
 {
     $view = new Zend_View();
     //$view->headScript()->appendFile ( '/js/jquery-1.7.1.js' );
     $view->headLink()->appendStylesheet('/js/themes/base/jquery.ui.all.css');
     $view->headScript()->appendFile('/js/jquery.ui.datepicker.js');
     $view->headScript()->appendFile('/js/jquery.ui.core.js');
     $view->headScript()->appendFile('/js/jquery.mousewheel-3.0.6.pack.js');
     $view->headScript()->appendFile('/js/jquery.fancybox.js?v=2.1.0');
     $view->headLink()->appendStylesheet('/js/jquery.fancybox.css?v=2.1.0');
     date_default_timezone_set('Asia/Ho_Chi_Minh');
     $aNamespace = new Zend_Session_Namespace('zs_User');
     if (!isset($aNamespace->islogin)) {
         $this->_redirect('/user');
     }
     $this->view->username = $aNamespace->username;
     $this->view->fullname = $aNamespace->fullname;
     $this->view->isAdmin = $aNamespace->isAdmin;
 }
开发者ID:alienpham,项目名称:resume-manager,代码行数:19,代码来源:VacancyController.php

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

示例13: _setView

 /**
  * set view
  */
 protected function _setView()
 {
     if (null === self::$_view) {
         self::$_view = new Zend_View();
         $title = "Shrimp Project";
         self::$_view->setScriptPath(SP_APP_PATH . '/modules/default/views')->setEncoding('UTF-8')->strictVars(false)->addHelperPath('SP/View/Helper', 'SP_View_Helper_');
         self::$_view->doctype('XHTML1_STRICT');
         self::$_view->headTitle($title);
         self::$_view->headLink()->appendStylesheet('/theme/default/main.css');
         self::$_view->headScript()->appendFile('/js/jquery-1.4.2.min.js');
         self::$_view->headScript()->appendFile('/js/jquery.cookie.js');
         self::$_view->headScript()->appendFile('/js/sorttable.js');
         //self::$_view->htmlTable();
     }
 }
开发者ID:victorli,项目名称:ShrimpProject,代码行数:18,代码来源:Application.php

示例14: _initView

 protected function _initView()
 {
     // initialize view
     $view = new Zend_View();
     // doctype
     $view->doctype('XHTML1_STRICT');
     // encoding
     $view->setEncoding('UTF-8');
     // title
     $view->headTitle('Ofelia')->setSeparator(' | ')->setIndent(8);
     // meta tags
     $view->headMeta()->setHttpEquiv('Content-Type', 'text/html; charset=UTF-8')->appendHttpEquiv('Content-Language', 'en-US')->setName('keywords', 'Ofelia, Open-ended Front-end')->appendName('description', "PHPCabal's Open-ended Front-end")->appendName('google-site-verification', '')->setIndent(8);
     // stylesheets & feeds (headLinks)
     $view->headLink()->setStylesheet('/css/default.css', 'all')->appendStylesheet('/css/menu.css', 'all')->headLink(array('rel' => 'favicon', 'href' => '/images/favicon.ico'), 'PREPEND')->headLink(array('rel' => 'shortcut icon', 'href' => '/images/favicon.ico'), 'PREPEND')->appendAlternate('/feed/', 'application/rss+xml', 'Noticias Generales')->setIndent(8);
     // javascript
     $view->headScript()->appendFile('/js/default.js', 'text/javascript', array('charset' => 'utf-8'))->setIndent(8);
     // 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:richistron,项目名称:Ofelia,代码行数:22,代码来源:Bootstrap.php

示例15: _initView

 protected function _initView()
 {
     // initialize view
     $view = new Zend_View();
     // get it's configuration file
     $site = new Zend_Config_Ini(APPLICATION_PATH . '/configs/site.ini', APPLICATION_ENV);
     // doctype
     $view->doctype($site->doctype);
     // encoding
     $view->setEncoding($site->encoding);
     // title
     $view->headTitle($site->name)->setSeparator(' | ')->setIndent(8);
     // meta tags
     $view->headMeta()->setName('keywords', $site->keywords)->appendName('description', $site->description)->appendName('google-site-verification', $site->googleVerification)->setIndent(8);
     // stylesheets & feeds (headLinks)
     $view->headLink()->setStylesheet('/css/layout.css', 'all')->appendStylesheet('/css/default.css', 'all')->appendStylesheet('/css/menu.css', 'all')->headLink(array('rel' => 'favicon', 'href' => '/images/favicon.ico'), 'PREPEND')->headLink(array('rel' => 'shortcut icon', 'href' => '/images/favicon.ico'), 'PREPEND')->appendAlternate('/feed/', 'application/rss+xml', 'News')->setIndent(8);
     // javascript
     $view->headScript()->appendFile('/js/default.js', 'text/javascript', array('charset' => $site->encoding))->setIndent(8);
     // 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:heavro,项目名称:Ofelia,代码行数:24,代码来源:Bootstrap.php


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