本文整理匯總了PHP中Toolbar::getTag方法的典型用法代碼示例。如果您正苦於以下問題:PHP Toolbar::getTag方法的具體用法?PHP Toolbar::getTag怎麽用?PHP Toolbar::getTag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Toolbar
的用法示例。
在下文中一共展示了Toolbar::getTag方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$qt_p_list = array();
$qt_w_list = array();
foreach ( $current as &$line ) {
foreach ($line as $bit) {
$usedqt = array_merge($usedqt, $bit);
}
}
$customqt = Toolbar::getCustomList();
$view_mode = !empty($_REQUEST['view_mode']) ? $_REQUEST['view_mode'] : '';
foreach ( $qtlist as $name ) {
$tag = Toolbar::getTag($name);
if ( ! $tag ) {
continue;
}
$wys = strlen($tag->getWysiwygToken('dummy', false)) ? 'qt-wys' : '';
$wyswik = strlen($tag->getWysiwygWikiToken('dummy', false)) ? 'qt-wyswik' : '';
$test_html = $tag->getWikiHtml('');
$wiki = strlen($test_html) > 0 ? 'qt-wiki' : '';
$wiki = strpos($test_html, 'qt-sheet') !== false ? 'qt-sheet' : $wiki;
$cust = Toolbar::isCustomTool($name) ? 'qt-custom' : '';
$avail = $tag->isAccessible() ? '' : 'qt-noaccess';
$icon = $tag->getIconHtml();
if (strpos($name, 'wikiplugin_') !== false) {
$plug = 'qt-plugin';
示例2: array
$usedqt = array();
$qt_p_list = array();
$qt_w_list = array();
foreach ($current as &$line) {
foreach ($line as $bit) {
$usedqt = array_merge($usedqt, $bit);
}
}
$customqt = Toolbar::getCustomList();
$view_mode = !empty($_REQUEST['view_mode']) ? $_REQUEST['view_mode'] : '';
foreach ($qtlist as $name) {
$tag = Toolbar::getTag($name);
if (!$tag) {
$tag = Toolbar::getTag($name, true);
if (!$tag) {
$tag = Toolbar::getTag($name, true, true);
continue;
}
}
$wys = strlen($tag->getWysiwygToken('dummy', false)) ? 'qt-wys' : '';
$wyswik = strlen($tag->getWysiwygWikiToken('dummy', false)) ? 'qt-wyswik' : '';
$test_html = $tag->getWikiHtml('');
$wiki = strlen($test_html) > 0 ? 'qt-wiki' : '';
$wiki = strpos($test_html, 'qt-sheet') !== false ? 'qt-sheet' : $wiki;
$cust = Toolbar::isCustomTool($name) ? 'qt-custom' : '';
$avail = $tag->isAccessible() ? '' : 'qt-noaccess';
$icon = $tag->getIconHtml();
if (strpos($name, 'wikiplugin_') !== false) {
$plug = 'qt-plugin';
$label = substr($name, 11);
$qt_p_list[] = $name;
示例3: addLine
private function addLine(array $tags, array $rtags = array())
{
$elements = array();
$j = count($rtags) > 0 ? 2 : 1;
for ($i = 0; $i < $j; $i++) {
$group = array();
$elements[$i] = array();
if ($i == 0) {
$thetags = $tags;
} else {
$thetags = $rtags;
}
foreach ($thetags as $tagName) {
if ($tagName == '-') {
if (count($group)) {
$elements[$i][] = $group;
$group = array();
}
} else {
if (($tag = Toolbar::getTag($tagName, $this->wysiwyg, $this->is_html)) && $tag->isAccessible()) {
$group[] = $tag;
}
}
}
if (count($group)) {
$elements[$i][] = $group;
}
}
if (count($elements)) {
$this->lines[] = $elements;
}
}