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


PHP Assets::stylesheet方法代碼示例

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


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

示例1: getHeadElements

 /**
  * Return all HTML HEAD elements as a string.
  *
  * @return string   HTML fragment
  */
 public static function getHeadElements()
 {
     $result = '';
     $package_elements = self::includeSqueezePackages();
     if (isset($GLOBALS['_include_stylesheet'])) {
         unset($package_elements['base-style.css']);
         self::addStylesheet($GLOBALS['_include_stylesheet'], array('media' => 'screen, print'));
     }
     $head_elements = array_merge($package_elements, self::$head_elements);
     foreach ($head_elements as $element) {
         $result .= '<' . $element['name'];
         foreach ($element['attributes'] as $key => $value) {
             $result .= sprintf(' %s="%s"', $key, htmlReady($value));
         }
         $result .= ">\n";
         if (isset($element['content'])) {
             $result .= $element['content'];
             $result .= '</' . $element['name'] . ">\n";
         }
     }
     if (isset($GLOBALS['_include_extra_stylesheet'])) {
         $result .= Assets::stylesheet($GLOBALS['_include_extra_stylesheet']);
     }
     if (isset($GLOBALS['_include_additional_header'])) {
         $result .= $GLOBALS['_include_additional_header'];
     }
     return $result;
 }
開發者ID:ratbird,項目名稱:hope,代碼行數:33,代碼來源:PageLayout.php

示例2: test_stylesheet_should_respect_options

 function test_stylesheet_should_respect_options()
 {
     $expected = '<link href="' . STATIC_ASSETS_URL . 'stylesheets/blue.css" media="all" rel="stylesheet">' . "\n";
     $expected .= '<link href="' . STATIC_ASSETS_URL . 'stylesheets/green.css" media="all" rel="stylesheet">' . "\n";
     $expected .= '<link href="' . STATIC_ASSETS_URL . 'stylesheets/red.css" media="all" rel="stylesheet">' . "\n";
     $this->assertEquals($expected, Assets::stylesheet('blue', 'green', 'red', array('media' => 'all')));
 }
開發者ID:ratbird,項目名稱:hope,代碼行數:7,代碼來源:AssetsClassTest.php

示例3: _

<?
# Lifter010: TODO
?>
<html>
<head>
  <?php 
echo Assets::stylesheet('style.css');
?>
</head>
<body>
  <div style="background-color: white; margin: auto; max-width: 700px; padding: 4px;">
    <?php 
echo Assets::img("locale/{$lang}/LC_PICTURES/mail_header_notification.png");
?>
    <p>
      <?php 
echo _("Sie erhalten hiermit in regelmäßigen Abständen Informationen über Neuigkeiten und Änderungen in belegten Veranstaltungen.");
?>
      <br><br>
      <?php 
echo _("Über welche Inhalte und in welchem Format Sie informiert werden wollen, können Sie hier einstellen:");
?>
      <br>
      <a href="<?php 
echo URLHelper::getLink('dispatch.php/settings/notification');
?>
">
        <?php 
echo URLHelper::getLink('dispatch.php/settings/notification');
?>
      </a>
開發者ID:ratbird,項目名稱:hope,代碼行數:31,代碼來源:notification_html.php


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