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


PHP Zend_View::headLink方法代码示例

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


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

示例1: setHeadLinks

 /**
  * Set <link> elements
  *
  * @return void
  */
 public function setHeadLinks()
 {
     foreach ($this->getOptions() as $headLink => $options) {
         $attributes = array_key_exists('attributes', $options) && isset($options['attributes']) ? $options['attributes'] : array();
         $placement = array_key_exists('placement', $options) && isset($options['placement']) ? $options['placement'] : 'APPEND';
         $this->_view->headLink($attributes, $placement);
     }
 }
开发者ID:rockett,项目名称:parables,代码行数:13,代码来源:Headlinks.php

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

示例3:

 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

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

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

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

示例7: preDispatch

 public function preDispatch()
 {
     $bootstrap = $this->getActionController()->getInvokeArg('bootstrap');
     $config = $bootstrap->getOptions();
     $module = $this->getRequest()->getModuleName();
     if (isset($config[$module]['resources']['layout']['layout'])) {
         $layoutScript = $config[$module]['resources']['layout']['layout'];
         $this->getActionController()->getHelper('layout')->setLayout($layoutScript);
     }
     if (isset($config[$module]['site'])) {
         $headtitle = $config[$module]['site']['headtitle'];
         $keywords = $config[$module]['site']['keywords'];
         $description = $config[$module]['site']['description'];
         $layout = $module . '.css';
         $favicon = $module . '/favicon.ico';
     } else {
         $headtitle = $config['site']['headtitle'];
         $keywords = $config['site']['keywords'];
         $description = $config['site']['description'];
         $layout = 'default.css';
         $favicon = 'favicon.ico';
     }
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $view->headTitle($headtitle);
     $view->headTitle()->setSeparator(' | ');
     $view->headLink()->prependStylesheet('/css/' . $layout)->headLink(array('rel' => 'favicon', 'href' => '/images/' . $favicon), 'PREPEND')->prependStylesheet('/css/reset.css')->appendStylesheet('/css/menu.css');
     $view->env = APPLICATION_ENV;
     $view->headMeta()->appendName('keyword', $keywords)->appendName('description', $description)->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')->appendHttpEquiv('Content-Language', 'en-US');
 }
开发者ID:harleyflh75,项目名称:ZF_Framework,代码行数:30,代码来源:LayoutLoader.php

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

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

 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

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

示例12: __construct

 /** Construct the form
  * @access public
  */
 public function __construct()
 {
     $this->addPrefixPath('Pas_Form_Element', 'Pas/Form/Element', 'element');
     $this->addElementPrefixPath('Pas_Filter', 'Pas/Filter/', 'filter');
     $this->addElementPrefixPath('Pas_Validate', 'Pas/Validate/', 'validate');
     $this->setAttrib('class', 'form-horizontal');
     $this->setAttrib('accept-charset', 'UTF-8');
     $this->clearDecorators();
     $this->_view = Zend_Layout::getMvcInstance()->getView();
     $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/select2.min.js', $type = 'text/javascript');
     $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/selectPrettify.js', $type = 'text/javascript');
     $this->_view->headLink()->appendStylesheet($this->_view->baseUrl() . '/css/select2.css', $type = 'screen');
     $this->_view->headLink()->appendStylesheet($this->_view->baseUrl() . '/css/bootstrap-multiselect.css', $type = 'screen');
     $person = new Pas_User_Details();
     $details = $person->getPerson();
     if ($details) {
         $this->_role = $details->role;
     } else {
         $this->_role = 'public';
     }
     parent::__construct();
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:25,代码来源:Form.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: indexAction

 public function indexAction()
 {
     $view = new Zend_View();
     $view->headLink()->appendStylesheet('/css/stylesheet.css');
     $this->_helper->layout->disableLayout();
     $aNamespace = new Zend_Session_Namespace('zs_User');
     if (isset($aNamespace->islogin)) {
         $this->_redirect('/resume');
     }
     $request = $this->getRequest();
     $msg = addslashes($request->getParam('msg'));
     $message = '';
     if ($msg) {
         $message = 'Username or Password incorrect!';
     }
     $this->view->message = $message;
 }
开发者ID:alienpham,项目名称:resume-manager,代码行数:17,代码来源:UserController.php

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


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