本文整理汇总了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;
}
示例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')));
}
示例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>