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


PHP HTMLPage::addStylesheetToHead方法代碼示例

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


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

示例1: HTMLPage

<?php

include_once TOOLKIT . '/class.htmlpage.php';
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addStylesheetToHead(SYMPHONY_URL . '/assets/basic.css', 'screen', 30);
$Page->addStylesheetToHead(SYMPHONY_URL . '/assets/error.css', 'screen', 30);
$Page->addHeaderToPage('HTTP/1.0 500 Server Error');
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'xslt');
$Page->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), __('XSLT Processing Error'))));
$div = new XMLElement('div', NULL, array('id' => 'description'));
$div->appendChild(new XMLElement('h1', __('XSLT Processing Error')));
$div->appendChild(new XMLElement('p', __('This page could not be rendered due to the following XSLT processing errors.')));
$Page->Body->appendChild($div);
$ul = new XMLElement('ul', NULL, array('id' => 'details'));
$errors_grouped = array();
list($key, $val) = $e->getAdditional()->proc->getError(false, true);
do {
    if (preg_match('/^loadXML\\(\\)/i', $val['message']) && preg_match_all('/line:\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['xml'][] = array('line' => $matches[1][0], 'raw' => $val);
    } elseif (preg_match_all('/pages\\/([^.\\/]+\\.xsl)\\s+line\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['page'][$matches[1][0]][] = array('line' => $matches[2][0], 'raw' => $val);
    } elseif (preg_match_all('/utilities\\/([^.\\/]+\\.xsl)\\s+line\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['utility'][$matches[1][0]][] = array('line' => $matches[2][0], 'raw' => $val);
    } else {
        $errors_grouped['general'][] = $val;
    }
開發者ID:benesch,項目名稱:hilton-unar,代碼行數:31,代碼來源:tpl.xslt-error.php

示例2: HTMLPage

<?php

include_once TOOLKIT . '/class.htmlpage.php';
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addElementToHead(new XMLElement('link', NULL, array('rel' => 'icon', 'href' => URL . '/symphony/assets/images/bookmark.png', 'type' => 'image/png')), 20);
$Page->addStylesheetToHead(URL . '/symphony/assets/error.css', 'screen', 30);
$Page->addElementToHead(new XMLElement('!--[if IE]><link rel="stylesheet" href="' . URL . '/symphony/assets/legacy.css" type="text/css"><![endif]--'), 40);
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'generic');
if (isset($additional['header'])) {
    $Page->addHeaderToPage($additional['header']);
}
$Page->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), $heading)));
$div = new XMLElement('div', NULL, array('id' => 'description'));
$div->appendChild(new XMLElement('h1', $heading));
$div->appendChild(is_object($errstr) ? $errstr : new XMLElement('p', trim($errstr)));
$Page->Body->appendChild($div);
print $Page->generate();
exit;
開發者ID:bauhouse,項目名稱:sym-fluid960gs,代碼行數:23,代碼來源:tpl.error.php

示例3: HTMLPage

<?php

include_once TOOLKIT . '/class.htmlpage.php';
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addStylesheetToHead(APPLICATION_URL . '/assets/css/symphony.css', 'screen', 30);
$Page->addStylesheetToHead(APPLICATION_URL . '/assets/css/symphony.frames.css', 'screen', 31);
$Page->setHttpStatus($e->getHttpStatusCode());
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'xslt');
$Page->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), __('XSLT Processing Error'))));
$Page->Body->setAttribute('id', 'fatalerror');
$div = new XMLElement('div', NULL, array('class' => 'frame'));
$ul = new XMLElement('ul');
$li = new XMLElement('li');
$li->appendChild(new XMLElement('h1', __('XSLT Processing Error')));
$li->appendChild(new XMLElement('p', __('This page could not be rendered due to the following XSLT processing errors:')));
$ul->appendChild($li);
$errors_grouped = array();
list($key, $val) = $e->getAdditional()->proc->getError(false, true);
do {
    if (preg_match('/^loadXML\\(\\)/i', $val['message']) && preg_match_all('/line:\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['xml'][] = array('line' => $matches[1][0], 'raw' => $val);
    } elseif (preg_match_all('/pages\\/([^.\\/]+\\.xsl)\\s+line\\s+(\\d+)/i', $val['message'], $matches) || preg_match_all('/pages\\/([^.\\/]+\\.xsl):(\\d+):/i', $val['message'], $matches)) {
        $errors_grouped['page'][$matches[1][0]][] = array('line' => $matches[2][0], 'raw' => $val);
    } elseif (preg_match_all('/utilities\\/([^.\\/]+\\.xsl)\\s+line\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['utility'][$matches[1][0]][] = array('line' => $matches[2][0], 'raw' => $val);
    } else {
開發者ID:davjand,項目名稱:codecept-symphonycms-db,代碼行數:31,代碼來源:usererror.xslt.php

示例4: HTMLPage

<?php

include_once TOOLKIT . '/class.htmlpage.php';
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addStylesheetToHead(SYMPHONY_URL . '/assets/css/symphony.css', 'screen', 30);
$Page->addStylesheetToHead(SYMPHONY_URL . '/assets/css/symphony.frames.css', 'screen', 31);
$Page->addHeaderToPage('Status', '500 Internal Server Error', 500);
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'generic');
if (isset($e->getAdditional()->header)) {
    $Page->addHeaderToPage($e->getAdditional()->header);
}
$Page->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), $e->getHeading())));
$Page->Body->setAttribute('id', 'error');
$div = new XMLElement('div', NULL, array('class' => 'frame'));
$div->appendChild(new XMLElement('h1', $e->getHeading()));
$div->appendChild($e->getMessageObject() instanceof XMLElement ? $e->getMessageObject() : new XMLElement('p', trim($e->getMessage())));
$Page->Body->appendChild($div);
$output = $Page->generate();
header(sprintf('Content-Length: %d', strlen($output)));
echo $output;
exit;
開發者ID:bauhouse,項目名稱:Piano-Sonata,代碼行數:26,代碼來源:usererror.generic.php

示例5: elseif

    if (isset($_POST['action']['delete'])) {
        Symphony::ExtensionManager()->cleanupDatabase();
    } elseif (isset($_POST['action']['rename'])) {
        $path = ExtensionManager::__getDriverPath($name);
        if (!@rename(EXTENSIONS . '/' . $_POST['existing-folder'], EXTENSIONS . '/' . $_POST['new-folder'])) {
            Symphony::Engine()->throwCustomError(__('Could not find extension %s at location %s.', array('<code>' . $name . '</code>', '<code>' . $path . '</code>')), __('Symphony Extension Missing Error'), Page::HTTP_STATUS_ERROR, 'missing_extension', array('name' => $name, 'path' => $path, 'rename_failed' => true));
        }
    }
    redirect(SYMPHONY_URL . '/system/extensions/');
}
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', null, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addStylesheetToHead(APPLICATION_URL . '/assets/css/symphony.min.css', 'screen', null, false);
$Page->setHttpStatus($e->getHttpStatusCode());
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'missing-extension');
$Page->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), $e->getHeading())));
$Page->Body->setAttribute('id', 'error');
$div = new XMLElement('div', null, array('class' => 'frame'));
$div->appendChild(new XMLElement('h1', $e->getHeading()));
$div->appendChild(new XMLElement('p', trim($e->getMessage())));
// Build the form, what it can do is yet to be determined
$form = new XMLElement('form', null, array('action' => SYMPHONY_URL . '/system/extensions/', 'method' => 'post'));
$form->appendChild(Widget::Input('extension-missing', 'yes', 'hidden'));
$actions = new XMLElement('div');
$actions->setAttribute('class', 'actions');
$actions->appendChild(Widget::Input('action[delete]', __('Uninstall extension'), 'submit', array('accesskey' => 'd', 'class' => 'button delete', 'style' => 'margin-left: 0;', 'title' => __('Uninstall this extension'))));
$form->appendChild($actions);
開發者ID:valery,項目名稱:symphony-2,代碼行數:31,代碼來源:usererror.missing_extension.php

示例6: HTMLPage

<?php

include_once TOOLKIT . '/class.htmlpage.php';
$Page = new HTMLPage();
$Page->Html->setElementStyle('html');
$Page->Html->setDTD('<!DOCTYPE html>');
$Page->Html->setAttribute('xml:lang', 'en');
$Page->addElementToHead(new XMLElement('meta', null, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0);
$Page->addStylesheetToHead(ASSETS_URL . '/css/symphony.min.css', 'screen', null, false);
$Page->setHttpStatus($e->getHttpStatusCode());
$Page->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8');
$Page->addHeaderToPage('Symphony-Error-Type', 'xslt');
$Page->setTitle(__('%1$s &ndash; %2$s', array(__('Symphony'), __('XSLT Processing Error'))));
$Page->Body->setAttribute('id', 'error');
$div = new XMLElement('div', null, array('class' => 'frame'));
$ul = new XMLElement('ul');
$li = new XMLElement('li');
$li->appendChild(new XMLElement('h1', __('XSLT Processing Error')));
$li->appendChild(new XMLElement('p', __('This page could not be rendered due to the following XSLT processing errors:')));
$ul->appendChild($li);
$errors_grouped = array();
list($key, $val) = $e->getAdditional()->proc->getError(false, true);
do {
    if (preg_match('/^loadXML\\(\\)/i', $val['message']) && preg_match_all('/line:\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['xml'][] = array('line' => $matches[1][0], 'raw' => $val);
    } elseif (preg_match_all('/pages\\/([^.\\/]+\\.xsl)\\s+line\\s+(\\d+)/i', $val['message'], $matches) || preg_match_all('/pages\\/([^.\\/]+\\.xsl):(\\d+):/i', $val['message'], $matches)) {
        $errors_grouped['page'][$matches[1][0]][] = array('line' => $matches[2][0], 'raw' => $val);
    } elseif (preg_match_all('/utilities\\/([^.\\/]+\\.xsl)\\s+line\\s+(\\d+)/i', $val['message'], $matches)) {
        $errors_grouped['utility'][$matches[1][0]][] = array('line' => $matches[2][0], 'raw' => $val);
    } else {
        $val['parts'] = explode(' ', $val['message'], 3);
開發者ID:rc1,項目名稱:WebAppsWithCmsStartHere,代碼行數:31,代碼來源:usererror.xslt.php

示例7: appendSettingsHeaders

 public function appendSettingsHeaders(HTMLPage $page)
 {
     $url = URL . '/extensions/content_field/assets';
     $page->addStylesheetToHead($url . '/settings.css', 'screen');
 }
開發者ID:justinjaywang,項目名稱:oembed_field,代碼行數:5,代碼來源:oembed-content.php


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