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


PHP Tag::stylesheetLink方法代码示例

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


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

示例1: outputCss

 /**
  * Prints the HTML for CSS resources
  *
  * @param string $collectionName the name of the collection
  *
  * @return string the result of the collection
  **/
 public function outputCss($collectionName = null)
 {
     $collection = $this->collection($collectionName);
     if ($collection->getJoin()) {
         $filename = $collection->getTargetPath();
         if (file_exists($filename)) {
             $time = 0;
             foreach ($collection->getResources() as $resource) {
                 $tmp = filemtime($resource->getRealTargetPath());
                 if ($tmp > $time) {
                     $time = $tmp;
                 }
             }
             // If created
             if (filemtime($filename) > $time) {
                 $collection->setTargetUri($collection->getTargetUri() . '?' . filemtime($filename));
                 return Tag::stylesheetLink($collection->getTargetUri());
             }
         }
         // Else CREATE
         $res = parent::outputCss($collectionName);
         return $res;
     }
     return parent::outputCss($collectionName);
 }
开发者ID:atduarte,项目名称:allsos,代码行数:32,代码来源:AssetsManager.php

示例2: registryFunctions

 /**
  * Registers common function in Twig
  *
  * @param \Phalcon\Mvc\ViewInterface $view
  * @param \Phalcon\DiInterface       $di
  * @param array                      $userFunctions
  */
 protected function registryFunctions($view, DiInterface $di, $userFunctions = array())
 {
     $options = array('is_safe' => array('html'));
     $functions = array(new \Twig_SimpleFunction('content', function () use($view) {
         return $view->getContent();
     }, $options), new \Twig_SimpleFunction('partial', function ($partialPath) use($view) {
         return $view->partial($partialPath);
     }, $options), new \Twig_SimpleFunction('linkTo', function ($parameters, $text = null) {
         return \Phalcon\Tag::linkTo($parameters, $text);
     }, $options), new \Twig_SimpleFunction('textField', function ($parameters) {
         return \Phalcon\Tag::textField($parameters);
     }, $options), new \Twig_SimpleFunction('passwordField', function ($parameters) {
         return \Phalcon\Tag::passwordField($parameters);
     }, $options), new \Twig_SimpleFunction('hiddenField', function ($parameters) {
         return \Phalcon\Tag::hiddenField($parameters);
     }, $options), new \Twig_SimpleFunction('fileField', function ($parameters) {
         return \Phalcon\Tag::fileField($parameters);
     }, $options), new \Twig_SimpleFunction('checkField', function ($parameters) {
         return \Phalcon\Tag::checkField($parameters);
     }, $options), new \Twig_SimpleFunction('radioField', function ($parameters) {
         return \Phalcon\Tag::radioField($parameters);
     }, $options), new \Twig_SimpleFunction('submitButton', function ($parameters) {
         return \Phalcon\Tag::submitButton($parameters);
     }, $options), new \Twig_SimpleFunction('selectStatic', function ($parameters, $data = array()) {
         return \Phalcon\Tag::selectStatic($parameters, $data);
     }, $options), new \Twig_SimpleFunction('select', function ($parameters, $data = array()) {
         return \Phalcon\Tag::select($parameters, $data);
     }, $options), new \Twig_SimpleFunction('textArea', function ($parameters) {
         return \Phalcon\Tag::textArea($parameters);
     }, $options), new \Twig_SimpleFunction('form', function ($parameters = array()) {
         return \Phalcon\Tag::form($parameters);
     }, $options), new \Twig_SimpleFunction('endForm', function () {
         return \Phalcon\Tag::endForm();
     }, $options), new \Twig_SimpleFunction('getTitle', function () {
         return \Phalcon\Tag::getTitle();
     }, $options), new \Twig_SimpleFunction('stylesheetLink', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::stylesheetLink($parameters, $local);
     }, $options), new \Twig_SimpleFunction('javascriptInclude', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::javascriptInclude($parameters, $local);
     }, $options), new \Twig_SimpleFunction('image', function ($parameters) {
         return \Phalcon\Tag::image($parameters);
     }, $options), new \Twig_SimpleFunction('friendlyTitle', function ($text, $separator = null, $lowercase = true) {
         return \Phalcon\Tag::friendlyTitle($text, $separator, $lowercase);
     }, $options), new \Twig_SimpleFunction('getDocType', function () {
         return \Phalcon\Tag::getDocType();
     }, $options), new \Twig_SimpleFunction('getSecurityToken', function () use($di) {
         return $di->get("security")->getToken();
     }, $options), new \Twig_SimpleFunction('getSecurityTokenKey', function () use($di) {
         return $di->get("security")->getTokenKey();
     }, $options), new \Twig_SimpleFunction('url', function ($route) use($di) {
         return $di->get("url")->get($route);
     }, $options));
     if (!empty($userFunctions)) {
         $functions = array_merge($functions, $userFunctions);
     }
     foreach ($functions as $function) {
         $this->twig->addFunction($function);
     }
 }
开发者ID:lisong,项目名称:incubator,代码行数:66,代码来源:Twig.php

示例3: importResources

 /**
  * Import CodeMirror resources
  *
  * @return void
  */
 public static function importResources()
 {
     echo Tag::javascriptInclude('js/codemirror/lib/codemirror.js');
     echo Tag::javascriptInclude('js/codemirror/mode/clike/clike.js');
     echo Tag::javascriptInclude('js/codemirror/mode/xml/xml.js');
     echo Tag::javascriptInclude('js/codemirror/mode/css/css.js');
     echo Tag::javascriptInclude('js/codemirror/mode/php/php.js');
     echo Tag::javascriptInclude('js/codemirror/lib/codephalcon.js');
     echo Tag::stylesheetLink('css/codemirror/codemirror.css');
     echo Tag::stylesheetLink('css/codemirror/codephalcon.css');
 }
开发者ID:doit76,项目名称:phalcon-devtools,代码行数:16,代码来源:CodeMirror.php

示例4: registryFunctions

 /**
  * Registers common function in Twig
  *
  * @param \Phalcon\Mvc\ViewInterface $view
  */
 private function registryFunctions($view)
 {
     $options = array('is_safe' => array('html'));
     $functions = array(new \Twig_SimpleFunction('content', function () use($view) {
         return $view->getContent();
     }, $options), new \Twig_SimpleFunction('partial', function ($partialPath) use($view) {
         return $view->partial($partialPath);
     }, $options), new \Twig_SimpleFunction('linkTo', function ($parameters, $text = null) {
         return \Phalcon\Tag::linkTo($parameters, $text);
     }, $options), new \Twig_SimpleFunction('textField', function ($parameters) {
         return \Phalcon\Tag::textField($parameters);
     }, $options), new \Twig_SimpleFunction('passwordField', function ($parameters) {
         return \Phalcon\Tag::passwordField($parameters);
     }, $options), new \Twig_SimpleFunction('hiddenField', function ($parameters) {
         return \Phalcon\Tag::hiddenField($parameters);
     }, $options), new \Twig_SimpleFunction('fileField', function ($parameters) {
         return \Phalcon\Tag::fileField($parameters);
     }, $options), new \Twig_SimpleFunction('checkField', function ($parameters) {
         return \Phalcon\Tag::checkField($parameters);
     }, $options), new \Twig_SimpleFunction('radioField', function ($parameters) {
         return \Phalcon\Tag::radioField($parameters);
     }, $options), new \Twig_SimpleFunction('submitButton', function ($parameters) {
         return \Phalcon\Tag::submitButton($parameters);
     }, $options), new \Twig_SimpleFunction('selectStatic', function ($parameters, $data = []) {
         return \Phalcon\Tag::selectStatic($parameters, $data);
     }, $options), new \Twig_SimpleFunction('select', function ($parameters, $data = []) {
         return \Phalcon\Tag::select($parameters, $data);
     }, $options), new \Twig_SimpleFunction('textArea', function ($parameters) {
         return \Phalcon\Tag::textArea($parameters);
     }, $options), new \Twig_SimpleFunction('form', function ($parameters = []) {
         return \Phalcon\Tag::form($parameters);
     }, $options), new \Twig_SimpleFunction('endForm', function () {
         return \Phalcon\Tag::endForm();
     }, $options), new \Twig_SimpleFunction('getTitle', function () {
         return \Phalcon\Tag::getTitle();
     }, $options), new \Twig_SimpleFunction('getTitle', function () {
         return \Phalcon\Tag::getTitle();
     }, $options), new \Twig_SimpleFunction('stylesheetLink', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::stylesheetLink($parameters, $local);
     }, $options), new \Twig_SimpleFunction('javascriptInclude', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::javascriptInclude($parameters, $local);
     }, $options), new \Twig_SimpleFunction('image', function ($parameters) {
         return \Phalcon\Tag::image($parameters);
     }, $options), new \Twig_SimpleFunction('friendlyTitle', function ($text, $separator = null, $lowercase = true) {
         return \Phalcon\Tag::friendlyTitle($text, $separator, $lowercase);
     }, $options), new \Twig_SimpleFunction('getDocType', function () {
         return \Phalcon\Tag::getDocType();
     }, $options));
     foreach ($functions as $function) {
         $this->_twig->addFunction($function);
     }
 }
开发者ID:tashik,项目名称:phalcon_core,代码行数:57,代码来源:Twig.php

示例5: testIssue1486

 public function testIssue1486()
 {
     $di = new Phalcon\DI\FactoryDefault();
     $di->getshared('url')->setBaseUri('/');
     \Phalcon\Tag::setDI($di);
     $html = \Phalcon\Tag::stylesheetLink('css/phalcon.css');
     $this->assertEquals($html, '<link rel="stylesheet" href="/css/phalcon.css" type="text/css" />' . PHP_EOL);
     $html = \Phalcon\Tag::stylesheetLink(array('css/phalcon.css'));
     $this->assertEquals($html, '<link rel="stylesheet" href="/css/phalcon.css" type="text/css" />' . PHP_EOL);
     $html = \Phalcon\Tag::javascriptInclude('js/phalcon.js');
     $this->assertEquals($html, '<script src="/js/phalcon.js" type="text/javascript"></script>' . PHP_EOL);
     $html = \Phalcon\Tag::javascriptInclude(array('js/phalcon.js'));
     $this->assertEquals($html, '<script src="/js/phalcon.js" type="text/javascript"></script>' . PHP_EOL);
 }
开发者ID:aisuhua,项目名称:phalcon-php,代码行数:14,代码来源:TagTest.php

示例6: importResources

 /**
  * Import CodeMirror resources
  *
  * @return void
  */
 public static function importResources()
 {
     echo Tag::stylesheetLink('css/codemirror/ambiance.css');
     echo Tag::stylesheetLink('css/codemirror/codemirror.css');
     echo Tag::javascriptInclude('js/codemirror/lib/codemirror.js');
     echo Tag::javascriptInclude('js/codemirror/addon/edit/matchbrackets.js');
     echo Tag::javascriptInclude('js/codemirror/addon/selection/active-line.js');
     echo Tag::javascriptInclude('js/codemirror/mode/clike/clike.js');
     echo Tag::javascriptInclude('js/codemirror/mode/htmlmixed/htmlmixed.js');
     echo Tag::javascriptInclude('js/codemirror/mode/xml/xml.js');
     echo Tag::javascriptInclude('js/codemirror/mode/css/css.js');
     echo Tag::javascriptInclude('js/codemirror/mode/php/php.js');
     echo Tag::javascriptInclude('js/codemirror/lib/codephalcon.js');
     echo Tag::stylesheetLink('css/codemirror/codephalcon.css');
 }
开发者ID:ntamvl,项目名称:phalcon-devtools,代码行数:20,代码来源:CodeMirror.php

示例7: outputCss

 /**
  * Prints the HTML for CSS resources.
  *
  * @param string $collectionName the name of the collection
  *
  * @return string
  **/
 public function outputCss($collectionName = self::DEFAULT_COLLECTION_CSS)
 {
     $remote = $this->_config->application->assets->get('remote');
     $collection = $this->collection($collectionName);
     if (!$remote && $collection->getJoin()) {
         $local = $this->_config->application->assets->get('local');
         $lifetime = $this->_config->application->assets->get('lifetime', 0);
         $filepath = $local . self::GENERATED_STORAGE_PATH . ($filename = $filename = $this->getCollectionFileName($collection, self::FILENAME_PATTERN_CSS));
         $collection->setTargetPath($filepath)->setTargetUri($filepath);
         if ($this->_cache->exists($filename)) {
             return Tag::stylesheetLink($collection->getTargetUri());
         }
         $res = parent::outputCss($collectionName);
         $this->_cache->save($filename, true, $lifetime);
         return $res;
     }
     return parent::outputCss($collectionName);
 }
开发者ID:biggtfish,项目名称:cms,代码行数:25,代码来源:Manager.php

示例8:

<?php

// Generate <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Rosario" type="text/css">
echo \Phalcon\Tag::stylesheetLink("http://fonts.googleapis.com/css?family=Rosario", false);
// Generate <link rel="stylesheet" href="/your-app/css/styles.css" type="text/css">
echo \Phalcon\Tag::stylesheetLink("css/styles.css");
开发者ID:aodkrisda,项目名称:phalcon-code,代码行数:6,代码来源:tags-474.php

示例9: stylesheetLink

 public static function stylesheetLink($parameters = null, $local = true)
 {
     return parent::stylesheetLink($parameters, $local);
 }
开发者ID:mattvb91,项目名称:cphalcon,代码行数:4,代码来源:Tag.php

示例10: builderStyle

    function builderStyle()
    {
        echo '<style>
 .dropzone-dashboard {
  background-color: #ffffff;
  min-height: 55px;
  float: left;
  margin-bottom: 5px;
  margin-top: 5px;
  opacity: 0.9;
  padding: 0;
  position: relative;
  transition: opacity 200ms ease;
  width: 100%;
  -webkit-transition: all 0.2s ease;
  -moz-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  -ms-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.dropzone-dashboard.active {
  opacity: 1;
}


.hover {
  background: #EEE;
  margin:8px;
  min-height: 45px;
  position: relative;
  width: 100%;
  -webkit-transition: opacity 0.2s ease;
  -moz-transition: opacity 0.2s ease;
  -o-transition: opacity 0.2s ease;
  -ms-transition: opacity 0.2s ease;
  transition: opacity 0.2s ease;
}

</style>';
        echo '<style>
 .dropzone-portlet {
  background-color: #ffffff;
  min-height: 55px;
  float: left;
  margin-bottom: 5px;
  margin-top: 5px;
  opacity: 0.9;
  padding: 0;
  position: relative;
  transition: opacity 200ms ease;
  width: 100%;
  -webkit-transition: all 0.2s ease;
  -moz-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  -ms-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.dropzone-portlet.active {
  opacity: 1;
}


.hover {
  background: #EEE;
  margin:8px;
  min-height: 45px;
  position: relative;
  width: 100%;
  -webkit-transition: opacity 0.2s ease;
  -moz-transition: opacity 0.2s ease;
  -o-transition: opacity 0.2s ease;
  -ms-transition: opacity 0.2s ease;
  transition: opacity 0.2s ease;
}

</style>';
        echo \Phalcon\Tag::javascriptInclude('assets/global/plugins/jquery-ui/jquery-ui-droppable-iframe-fix.js');
        echo \Phalcon\Tag::stylesheetLink("https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.all.css");
    }
开发者ID:enricowillemse,项目名称:prime_admin,代码行数:81,代码来源:DashboardBase.php

示例11: testStylesheetLinkWithStringAsSecondParameterRemoteXHTML

 /**
  * Tests stylesheetLink with a string as the second parameter - remote link
  *
  * @author Nikos Dimopoulos <nikos@phalconphp.com>
  * @since  2012-10-26
  */
 public function testStylesheetLinkWithStringAsSecondParameterRemoteXHTML()
 {
     \Phalcon\Tag::setDoctype(\Phalcon\Tag::XHTML10_STRICT);
     $options = 'http://fonts.googleapis.com/css?family=Rosario';
     $expected = '<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Rosario" />' . PHP_EOL;
     $actual = \Phalcon\Tag::stylesheetLink($options, '0');
     $this->assertEquals($expected, $actual, sprintf($this->message, 'StylesheetLink remote with string as second parameter'));
 }
开发者ID:lisong,项目名称:cphalcon,代码行数:14,代码来源:UnitTest.php

示例12: testIssue2142

 public function testIssue2142()
 {
     $di = new Phalcon\DI\FactoryDefault();
     $di->getshared('url')->setBaseUri('/');
     \Phalcon\Tag::setDI($di);
     $html = \Phalcon\Tag::stylesheetLink(array('css/phalcon.css', 'rel' => 'stylesheet/less'));
     $this->assertEquals($html, '<link rel="stylesheet/less" type="text/css" href="/css/phalcon.css" />' . PHP_EOL);
 }
开发者ID:UqiOnline,项目名称:cphalcon7,代码行数:8,代码来源:TagTest.php

示例13: stylesheetLink

 public static function stylesheetLink($parameters = null, $local = null)
 {
     return Tag::stylesheetLink($parameters, $local);
 }
开发者ID:aleboisselier,项目名称:phalcon-jquery,代码行数:4,代码来源:PhalconUtils.php


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