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


PHP CMS_view::getCSS方法代码示例

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


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

示例1: treatWantedTag


//.........这里部分代码省略.........
                                 $files = is_array($files) ? $files : array();
                                 $media = $tag->getAttribute('media') ? $tag->getAttribute('media') : 'all';
                                 //append module css files
                                 if (!isset($files[$media])) {
                                     $files[$media] = array();
                                 }
                                 $files[$media] = array_merge($files[$media], $tagFiles);
                                 //save files
                                 CMS_module::moduleUsage($treatedObject->getID(), "atm-css-tags", $files, true);
                                 break;
                         }
                         //Create return for all saved modules files
                         switch ($tag->getName()) {
                             case "atm-js-tags":
                                 //get old files for this tag already needed by other modules
                                 $files = CMS_module::moduleUsage($treatedObject->getID(), "atm-js-tags");
                                 //add files from atm-js-add tag
                                 $filesAdd = CMS_module::moduleUsage($treatedObject->getID(), "atm-js-tags-add");
                                 $filesAdd = is_array($filesAdd) ? $filesAdd : array();
                                 $files = array_merge($files, $filesAdd);
                                 $return .= '<?php echo CMS_view::getJavascript(array(\'' . implode('\',\'', array_unique($files)) . '\')); ?>' . "\n";
                                 break;
                             case "atm-css-tags":
                                 $media = $tag->getAttribute('media') ? $tag->getAttribute('media') : 'all';
                                 //get old files for this tag already needed by other modules
                                 $files = CMS_module::moduleUsage($treatedObject->getID(), "atm-css-tags");
                                 //add files from atm-css-add tag
                                 $filesAdd = CMS_module::moduleUsage($treatedObject->getID(), "atm-css-tags-add");
                                 $filesAdd = is_array($filesAdd) ? $filesAdd : array();
                                 if (isset($files[$media])) {
                                     if (isset($filesAdd[$media])) {
                                         $files[$media] = array_merge($files[$media], $filesAdd[$media]);
                                     }
                                     $return .= '<?php echo CMS_view::getCSS(array(\'' . implode('\',\'', array_unique($files[$media])) . '\'), \'' . $media . '\'); ?>' . "\n";
                                 }
                                 break;
                         }
                         return $return;
                     }
                     break;
                 case "atm-meta-tags":
                     $attributes = array();
                     //normalize values for attributes
                     if ($tag->getAttributes()) {
                         $attributes = $tag->getAttributes();
                         foreach ($attributes as $tagName => $value) {
                             if ($attributes == '1' || $value == 'true') {
                                 $attributes[$tagName] = true;
                             } elseif ($value == '0' || $value == 'false') {
                                 $attributes[$tagName] = false;
                             }
                             if ($attributes[$tagName] !== false && $attributes[$tagName] !== true) {
                                 unset($attributes[$tagName]);
                             }
                         }
                     }
                     $metaDatas = $treatedObject->getMetaTags($visualizationMode == PAGE_VISUALMODE_HTML_PUBLIC, $attributes);
                     $usage = CMS_module::moduleUsage($treatedObject->getID(), $this->_codename);
                     //if page template already use atm-js-tags tag, no need to add JS again
                     if (!is_array($usage) || !isset($usage['atm-js-tags'])) {
                         $metaDatas .= '	<script type="text/javascript" src="' . PATH_REALROOT_WR . '/js/CMS_functions.js"></script>' . "\n";
                         //save JS handled
                         CMS_module::moduleUsage($treatedObject->getID(), $this->_codename, array('js-files' => true));
                     }
                     if ($visualizationMode == PAGE_VISUALMODE_FORM) {
                         global $cms_user;
开发者ID:davidmottet,项目名称:automne,代码行数:67,代码来源:standard.php

示例2:

echo PATH_ADMIN_WR;
?>
/modules/polymod/fckplugin.php',
						params:		{
							winId:			'FCKPolymod',
							id:				id,
							content:		content
						},
						nocache:	true,
						scope:		this
					}
				});
			}
		</script>
		<?php 
echo CMS_view::getCSS(array('ext', 'main'));
echo CMS_view::getJavascript(array('ext', 'main', 'initConfig'));
?>
		<script type="text/javascript">
			if (parent.parent) {
				//Declare Automne namespace
				Ext.namespace('Automne');
				pr = parent.parent.pr;
				Automne.locales = parent.parent.Automne.locales;
				Automne.message = parent.parent.Automne.message;
				Ext.MessageBox = parent.parent.Ext.MessageBox;
				Automne.server = parent.parent.Automne.server;
				Automne.context = parent.parent.Automne.context;
				Ext.Ajax = parent.parent.Ext.Ajax;
				Ext.BLANK_IMAGE_URL = '<?php 
echo PATH_ADMIN_IMAGES_WR;
开发者ID:davidmottet,项目名称:automne,代码行数:31,代码来源:polymod.php

示例3: _showHead

    /**
     * Writes html header
     *
     * @return void
     * @access private
     */
    private function _showHead($returnValue = false)
    {
        switch ($this->_displayMode) {
            case self::SHOW_JSON:
            case self::SHOW_RAW:
            case self::SHOW_XML:
                $return = '';
                if ($this->hasErrors()) {
                    $return .= '	<error>1</error>' . "\n" . '	<errormessage><![CDATA[' . $this->_espaceCdata($this->getErrors(true)) . ']]></errormessage>' . "\n";
                } else {
                    $return .= '	<error>0</error>' . "\n";
                }
                if ($this->_secure && CMS_session::tokenIsExpired('admin')) {
                    $token = CMS_session::getToken('admin');
                    //pr('new token : '.$token);
                    $return .= '	<token><![CDATA[' . $token . ']]></token>' . "\n";
                }
                if ($this->hasRawDatas()) {
                    $return .= '	<rawdatas><![CDATA[' . $this->_espaceCdata($this->getRawDatas(true)) . ']]></rawdatas>' . "\n";
                }
                if ($this->_actionmessage) {
                    $return .= '	<message><![CDATA[' . $this->_espaceCdata($this->_actionmessage) . ']]></message>' . "\n";
                }
                if ($this->_title) {
                    $return .= '	<title><![CDATA[' . $this->_espaceCdata($this->_title) . ']]></title>' . "\n";
                }
                if ($this->_disconnected) {
                    $return .= '	<disconnected>1</disconnected>' . "\n";
                }
                $scripts = CMS_scriptsManager::getScriptsNumberLeft();
                if ($scripts) {
                    $return .= '	<scripts>' . $scripts . '</scripts>' . "\n";
                }
                if (SYSTEM_DEBUG && STATS_DEBUG) {
                    $return .= '	<stats><![CDATA[' . $this->_espaceCdata(CMS_stats::view(true)) . ']]></stats>' . "\n";
                }
                $jsfiles = CMS_view::getJavascript(array(), 'screen', true);
                if ($jsfiles) {
                    $files = array('files' => $jsfiles, 'manager' => CMS_view::getJSManagerURL());
                    $return .= '	<jsfiles><![CDATA[' . $this->_espaceCdata(sensitiveIO::jsonEncode($files)) . ']]></jsfiles>' . "\n";
                }
                $cssfiles = CMS_view::getCSS(array(), 'screen', true);
                if ($cssfiles) {
                    $files = array('files' => $cssfiles, 'manager' => CMS_view::getCSSManagerURL());
                    $return .= '	<cssfiles><![CDATA[' . $this->_espaceCdata(sensitiveIO::jsonEncode($files)) . ']]></cssfiles>' . "\n";
                }
                if (!$returnValue) {
                    echo $return;
                } else {
                    return $return;
                }
                break;
            case self::SHOW_HTML:
            default:
                $title = $this->_title ? '<title>' . APPLICATION_LABEL . ' :: ' . $this->_title . '</title>' : '';
                echo '<head>
						<meta http-equiv="Content-Type" content="text/html; charset=' . APPLICATION_DEFAULT_ENCODING . '" />
						' . $title . '
						' . $this->_copyright() . '
						<meta name="generator" content="' . CMS_grandFather::SYSTEM_LABEL . '" />
						' . CMS_view::getCSS() . '
						' . CMS_view::getJavascript();
                if (APPLICATION_GCF_SUPPORT) {
                    echo '<meta http-equiv="X-UA-Compatible" content="chrome=1">';
                }
                echo '</head>';
                break;
        }
    }
开发者ID:davidmottet,项目名称:automne,代码行数:75,代码来源:view.php


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