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


PHP Toolbar::getIconHtml方法代码示例

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


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

示例1: getIconHtml

	function getIconHtml() // {{{ for admin page
	{
		global $headerlib;
		
		if ((!empty($this->icon) && $this->icon !== 'img/icons/shading.png') || in_array($this->label, array('Autosave'))) {
			return parent::getIconHtml();
		}
		
		$headerlib->add_cssfile('lib/ckeditor/skins/kama/editor.css');
		$cls = strtolower($this->wysiwyg);
		$cls = str_replace(array('selectall', 'removeformat', 'spellchecker'), array('selectAll', 'removeFormat', 'checkspell'), $cls);	// work around some "features" in ckeditor icons.css
		$headerlib->add_css(
						'span.cke_skin_kama {border: none;background: none;padding:0;margin:0;}'.
						'.toolbars-admin .row li.toolbar > span.cke_skin_kama {display: inline-block;}'
		);
		return '<span class="cke_skin_kama"><span class="cke_button"><span class="cke_button_' . htmlentities($cls, ENT_QUOTES, 'UTF-8') . '"' .
						' title="' . htmlentities($this->getLabel(), ENT_QUOTES, 'UTF-8') . '">'.
						'<span class="cke_icon"> </span>'.
					'</span></span></span>';
	} // }}}
开发者ID:railfuture,项目名称:tiki-website,代码行数:20,代码来源:toolbarslib.php

示例2: getIconHtml

 function getIconHtml()
 {
     if (!empty($this->iconname)) {
         $smarty = TikiLib::lib('smarty');
         $smarty->loadPlugin('smarty_function_icon');
         return smarty_function_icon(['name' => $this->iconname, 'ititle' => ':' . htmlentities($this->getLabel(), ENT_QUOTES, 'UTF-8'), 'iclass' => 'tips'], $smarty);
     }
     if (!empty($this->icon) && $this->icon !== 'img/icons/shading.png' || in_array($this->label, array('Autosave'))) {
         return parent::getIconHtml();
     }
     global $prefs;
     $skin = $prefs['wysiwyg_toolbar_skin'];
     $headerlib = TikiLib::lib('header');
     $headerlib->add_cssfile('vendor/ckeditor/ckeditor/skins/' . $skin . '/editor.css');
     $cls = strtolower($this->wysiwyg);
     $headerlib->add_css('span.cke_skin_' . $skin . ' {border: none;background: none;padding:0;margin:0;}' . '.toolbars-admin .row li.toolbar > span.cke_skin_' . $skin . ' {display: inline-block;}');
     return '<span class="cke_skin_' . $skin . '"><a class="cke_button cke_ltr" style="margin-top:-5px"><span class="cke_button__' . htmlentities($cls, ENT_QUOTES, 'UTF-8') . '_icon"' . ' title="' . htmlentities($this->getLabel(), ENT_QUOTES, 'UTF-8') . '">' . '<span class="cke_icon"> </span>' . '</span></a></span>';
 }
开发者ID:rjsmelo,项目名称:tiki,代码行数:18,代码来源:toolbarslib.php

示例3: getIconHtml

 function getIconHtml()
 {
     global $headerlib, $prefs;
     if (!empty($this->icon) && $this->icon !== 'img/icons/shading.png' || in_array($this->label, array('Autosave'))) {
         return parent::getIconHtml();
     }
     $skin = $prefs['wysiwyg_toolbar_skin'];
     $headerlib->add_cssfile('vendor/ckeditor/ckeditor/skins/' . $skin . '/editor.css');
     $cls = strtolower($this->wysiwyg);
     $headerlib->add_css('span.cke_skin_' . $skin . ' {border: none;background: none;padding:0;margin:0;}' . '.toolbars-admin .row li.toolbar > span.cke_skin_' . $skin . ' {display: inline-block;}');
     return '<span class="cke_skin_' . $skin . '"><a class="cke_button cke_ltr"><span class="cke_button__' . htmlentities($cls, ENT_QUOTES, 'UTF-8') . '_icon"' . ' title="' . htmlentities($this->getLabel(), ENT_QUOTES, 'UTF-8') . '">' . '<span class="cke_icon"> </span>' . '</span></a></span>';
 }
开发者ID:jkimdon,项目名称:cohomeals,代码行数:12,代码来源:toolbarslib.php


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