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