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


PHP rex_view::addCssFile方法代码示例

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


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

示例1: function

     return $subject;
 }, rex_extension::EARLY);
 if (rex::getUser() && $this->getProperty('compile')) {
     rex_addon::get('be_style')->setProperty('compile', true);
     rex_extension::register('PACKAGES_INCLUDED', function () {
         $compiler = new rex_scss_compiler();
         $compiler->setRootDir($this->getPath('scss/'));
         $compiler->setScssFile($this->getPath('scss/master.scss'));
         // Compile in backend assets dir
         $compiler->setCssFile($this->getPath('assets/css/styles.css'));
         $compiler->compile();
         // Compiled file to copy in frontend assets dir
         rex_file::copy($this->getPath('assets/css/styles.css'), $this->getAssetsPath('css/styles.css'));
     });
 }
 rex_view::addCssFile($this->getAssetsUrl('css/styles.css'));
 rex_view::addJsFile($this->getAssetsUrl('javascripts/redaxo.js'));
 rex_extension::register('PAGE_HEADER', function (rex_extension_point $ep) {
     $icons = [];
     foreach (['57', '60', '72', '76', '114', '120', '144', '152'] as $size) {
         $size = $size . 'x' . $size;
         $icons[] = '<link rel="apple-touch-icon-precomposed" sizes="' . $size . '" href="' . $this->getAssetsUrl('images/apple-touch-icon-' . $size . '.png') . '" />';
     }
     foreach (['16', '32', '96', '128', '196'] as $size) {
         $size = $size . 'x' . $size;
         $icons[] = '<link rel="icon" type="image/png" href="' . $this->getAssetsUrl('images/favicon-' . $size . '.png') . '" sizes="' . $size . '" />';
     }
     $icons[] = '<meta name="msapplication-TileColor" content="#FFFFFF" />';
     $icons[] = '<meta name="msapplication-TileImage" content="' . $this->getAssetsUrl('images/mstile-144x144.png') . '" />';
     foreach (['70', '150', '310'] as $size) {
         $size = $size . 'x' . $size;
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:boot.php

示例2: switch

     switch ($ep->getName()) {
         case 'ART_SLICES_COPY':
             $type = 'slices_copy';
             break;
         case 'SLICE_MOVE':
             $type = 'slice_' . $ep->getParam('direction');
             break;
         default:
             $type = strtolower($ep->getName());
     }
     $article_id = $ep->getParam('article_id');
     $clang_id = $ep->getParam('clang_id');
     $slice_revision = $ep->getParam('slice_revision');
     rex_article_slice_history::makeSnapshot($article_id, $clang_id, $type, $slice_revision);
 });
 rex_view::addCssFile($this->getAssetsUrl('history.css'));
 rex_view::addJsFile($this->getAssetsUrl('history.js'));
 $info = '';
 switch (rex_request('rex_history_function', 'string')) {
     case 'snap':
         $article_id = rex_request('history_article_id', 'int');
         $clang_id = rex_request('history_clang_id', 'int');
         $revision = rex_request('history_revision', 'int', 0);
         $history_date = rex_request('history_date', 'string');
         rex_article_slice_history::restoreSnapshot($history_date, $article_id, $clang_id, $revision);
         $info = $version['history_snapshot_history_reactivate_snapshot'];
     case 'layer':
         // article_id und clang_id und revision noch nötig
         $article_id = rex_request('history_article_id', 'int');
         $clang_id = rex_request('history_clang_id', 'int');
         $revision = rex_request('history_revision', 'int', 0);
开发者ID:redaxo,项目名称:redaxo,代码行数:31,代码来源:boot.php

示例3: function

<?php

rex_extension::register('BE_STYLE_LESS_FILES', function (rex_extension_point $ep) {
    $subject = $ep->getSubject();
    array_unshift($subject, rex_plugin::get('slice_ui', 'slice_json_block')->getPath('less/styles.less|sourceMap|compress'));
    return $subject;
}, rex_extension::EARLY);
if (!rex_plugin::exists('be_style', 'lessphp')) {
    rex_view::addCssFile($this->getPath() . 'less/styles.min.css');
}
rex_view::addJsFile($this->getAssetsUrl('slice_skin.js'));
开发者ID:nilsology,项目名称:slice_ui,代码行数:11,代码来源:boot.php

示例4:

<?php

/**
 * REDAXO customizer.
 *
 * Codemirror by : http://codemirror.net/
 * Marijn Haverbeke <marijnh@gmail.com>
 */
if (rex::isBackend() && rex::getUser()) {
    $config = $this->getConfig();
    rex_view::addCssFile($this->getAssetsUrl('css/styles.css'));
    if ($config['codemirror']) {
        rex_view::addCssFile($this->getAssetsUrl('vendor/codemirror/codemirror.css'));
        rex_view::addCssFile($this->getAssetsUrl('vendor/codemirror/theme/' . $config['codemirror_theme'] . '.css'));
        if ($config['codemirror_theme'] != '') {
            rex_view::setJsProperty('customizer_codemirror_defaulttheme', $config['codemirror_theme']);
        }
        rex_view::addJsFile($this->getAssetsUrl('vendor/codemirror/codemirror-compressed.js'));
    }
    if ($config['labelcolor'] != '') {
        rex_view::setJsProperty('customizer_labelcolor', $config['labelcolor']);
    }
    if ($config['showlink']) {
        rex_view::setJsProperty('customizer_showlink', '<h1 class="be-style-customizer-title"><a href="' . rex::getServer() . '" target="_blank">' . rex::getServerName() . '</a><i class="fa fa-external-link"></i></h1>');
    }
    rex_view::addJsFile($this->getAssetsUrl('js/main.js'));
}
开发者ID:staabm,项目名称:redaxo,代码行数:27,代码来源:boot.php

示例5:

<?php

/**
 * Textile Addon.
 *
 * @author markus[dot]staab[at]redaxo[dot]de Markus Staab
 *
 * @package redaxo5
 *
 * @var rex_addon $this
 */
if (rex::isBackend()) {
    rex_view::addCssFile($this->getAssetsUrl('textile.css'));
}
开发者ID:staabm,项目名称:redaxo,代码行数:14,代码来源:boot.php

示例6: markdown

<?php

/**
 * This file is part of the Url package.
 *
 * @author (c) Thomas Blum <thomas@addoff.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
/**
 * Convert some text to Markdown...
 */
function markdown($text)
{
    return (new ParsedownExtra())->text($text);
}
if (rex::isBackend()) {
    rex_view::addCssFile($this->getAssetsUrl('dao.css'));
    rex_view::addJsFile($this->getAssetsUrl('vendor/redips/redips-table.js'));
    if (rex_be_controller::getCurrentPage() == 'dao_var/readme') {
        rex_view::addJsFile($this->getAssetsUrl('prism.js'));
    }
}
开发者ID:tbaddade,项目名称:redaxo_dao_var,代码行数:24,代码来源:boot.php

示例7: function

}
rex_extension::register('PAGE_BODY_ATTR', function ($ep) {
    $Subject = $ep->getSubject();
    if ($_SESSION['slice_ui']['slice_id'] != 0) {
        $Subject['class'][] = 'copy';
    }
    return $Subject;
});
if (rex::isBackend() && is_object(rex::getUser())) {
    rex_perm::register('copy[]');
    rex_perm::register('slice_ui[]', null, rex_perm::OPTIONS);
    rex_perm::register('slice_ui[settings]', null, rex_perm::OPTIONS);
}
if (rex::isBackend()) {
    rex_view::addCssFile($this->getAssetsUrl('slice_ui.css'));
    rex_view::addCssFile($this->getAssetsUrl('jquery-ui.datepicker.css'));
    rex_view::addJsFile($this->getAssetsUrl('slice_ui.js'));
    rex_view::addJsFile($this->getAssetsUrl('jquery-ui.datepicker.js'));
}
if (rex_post('update_slice_status') != 1 && rex_get('function') == '') {
    rex_extension::register('SLICE_SHOW', 'slice_ui::extendBackendSlices');
}
rex_extension::register('SLICE_SHOW', 'slice_ui::isActive');
if (strpos(rex_request('page'), 'content/emptyclipboard') !== false) {
    slice_ui::emptyClipboard();
}
if (!empty($Config['general']['sticky_slice_nav']) && $Config['general']['sticky_slice_nav']) {
    rex_view::addJsFile($this->getAssetsUrl('sticky_header.js'));
}
if (strpos(rex_request('page'), 'content/paste') !== false) {
    slice_ui::addSlice();
开发者ID:nilsology,项目名称:slice_ui,代码行数:31,代码来源:boot.php

示例8: function

 */
$mypage = 'be_style';
/* Addon Parameter */
if (rex::isBackend()) {
    rex_extension::register('PACKAGES_INCLUDED', function () {
        if (rex_extension::isRegistered('BE_STYLE_PAGE_CONTENT')) {
            rex_addon::get('be_style')->setProperty('name', 'Backend Style');
        }
    });
    rex_extension::register('PACKAGES_INCLUDED', function () {
        if (rex::getUser() && $this->getProperty('compile')) {
            $compiler = new rex_scss_compiler();
            $scss_files = rex_extension::registerPoint(new rex_extension_point('BE_STYLE_SCSS_FILES', [$this->getPath('scss/master.scss')]));
            $compiler->setScssFile($scss_files);
            //$compiler->setScssFile($this->getPath('scss/master.scss'));
            // Compile in backend assets dir
            $compiler->setCssFile($this->getPath('assets/css/styles.css'));
            $compiler->compile();
            // Compiled file to copy in frontend assets dir
            rex_file::copy($this->getPath('assets/css/styles.css'), $this->getAssetsPath('css/styles.css'));
        }
    });
    rex_view::addCssFile($this->getAssetsUrl('css/styles.css'));
    rex_view::addCssFile($this->getAssetsUrl('css/bootstrap-select.min.css'));
    rex_view::addCssFile($this->getAssetsUrl('css/perfect-scrollbar.min.css'));
    rex_view::addJsFile($this->getAssetsUrl('javascripts/bootstrap.js'));
    rex_view::addJsFile($this->getAssetsUrl('javascripts/bootstrap-select.min.js'));
    rex_view::addJsFile($this->getAssetsUrl('javascripts/bootstrap-select-defaults-de_DE.min.js'));
    rex_view::addJsFile($this->getAssetsUrl('javascripts/perfect-scrollbar.jquery.min.js'));
    rex_view::addJsFile($this->getAssetsUrl('javascripts/main.js'));
}
开发者ID:staabm,项目名称:redaxo,代码行数:31,代码来源:boot.php

示例9: array

<?php

if (rex::isBackend() && is_object(rex::getUser())) {
    rex_perm::register('copy[]');
    rex_perm::register('slice_ui[]', null, rex_perm::OPTIONS);
    rex_perm::register('slice_ui[settings]', null, rex_perm::OPTIONS);
}
if (strpos(rex_request('page'), 'content/emptyclipboard') !== false) {
    slice_ui::emptyClipboard();
}
rex_view::addCssFile($this->getAssetsUrl('slice_ui.css'));
if (strpos(rex_request('page'), 'content/paste') !== false) {
    slice_ui::addSlice();
}
if (strpos(rex_request('page'), 'content/toggleSlice') !== false) {
    slice_ui::toggleSlice();
}
if (is_object(rex::getUser()) && (!rex::getUser()->hasPerm('editContentOnly[]') && rex::getUser()->hasPerm('slice_ui[]') || rex::getUser()->isAdmin())) {
    rex_extension::register('ART_SLICE_MENU', 'slice_ui::modifySliceEditMenu');
}
if (is_object(rex::getUser()) && (rex_request('page', 'string') === 'content/copy' || rex_request('page', 'string') === 'content/cut')) {
    slice_ui::copySlice();
}
rex_extension::register('SLICE_SHOW', 'slice_ui::isActive');
/* Slice-Menü überschreiben */
if (!empty($_SESSION['slice_ui'])) {
    $Content = rex_plugin::get('structure', 'content');
    $ContentPages = $Content->getProperty('pages');
    $ContentPages['content']['subpages']['paste'] = array('title' => 'Einfügen', 'icon' => 'rex-icon rex-icon-paste');
    $ContentPages['content']['subpages']['emptyclipboard'] = array('title' => 'Clipboard löschen', 'icon' => 'rex-icon rex-icon-emptyclipboard');
    $Content->setProperty('pages', $ContentPages);
开发者ID:eaCe,项目名称:slice_ui,代码行数:31,代码来源:boot.php

示例10: array

<?php

/**
 * rex5_multiupload Addon.
 * @author Friends Of REDAXO
 * @package redaxo
 * @var rex_addon $this
 */
$addon = rex_addon::get('rex5_multiupload');
// --- DYN
$properties = array('folder' => rex_path::media(), 'sync_cats' => '1', 'instant_upload_start' => '1', 'upload_simultaneously' => '5', 'clear_uploadlist_automatically' => '0', 'clear_file_after_finish' => '1', 'show_footnote' => '0', 'php_debug' => '0', 'javascript_debug' => '0');
foreach ($properties as $key => $val) {
    $addon->setProperty($key, $val);
}
// --- /DYN
// --- HEADER
if (rex::isBackend()) {
    rex_view::addCssFile($addon->getAssetsUrl('fileuploader.css'));
    rex_view::addJSFile($addon->getAssetsUrl('fileuploader.js'));
    $_REX_HACK_OPENER = "";
    $_REX_HACK_OPENER = rex_request('opener_input_field', 'string');
    $header = PHP_EOL . '  ' . PHP_EOL . '  <!-- rex5_multiupload -->' . PHP_EOL . '  <script type="text/javascript">var lastMediaPoolOpener = "' . $_REX_HACK_OPENER . '";</script>' . PHP_EOL . '  <!-- ###MULTIUPLOAD_EP_REPLACE### -->' . PHP_EOL . '  <!-- /rex5_multiupload -->' . PHP_EOL;
    rex_extension::register('OUTPUT_FILTER', function (rex_extension_point $ep) use($header) {
        $suchmuster = '</head>';
        $ersetzen = $header . "\n</head>";
        $ep->setSubject(str_replace($suchmuster, $ersetzen, $ep->getSubject()));
    });
}
// --- /HEADER
开发者ID:darwin26,项目名称:rex5_multiupload,代码行数:29,代码来源:boot.php

示例11:

<?php

rex_yform::addTemplatePath(rex_path::addon('yform', 'ytemplates'));
if (rex::isBackend() && rex::getUser()) {
    rex_view::addCssFile($this->getAssetsUrl('yform.css'));
    rex_view::addCssFile($this->getAssetsUrl('yform-formbuilder.css'));
}
开发者ID:VIEWSION,项目名称:redaxo_yform,代码行数:7,代码来源:boot.php


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