當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Toolbar::getCustomList方法代碼示例

本文整理匯總了PHP中Toolbar::getCustomList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Toolbar::getCustomList方法的具體用法?PHP Toolbar::getCustomList怎麽用?PHP Toolbar::getCustomList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Toolbar的用法示例。


在下文中一共展示了Toolbar::getCustomList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

} else {
    $rowCount = 1;
}
$init = '';
$setup = '';
$map = array();
$qtlist = Toolbar::getList();
$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;
開發者ID:jkimdon,項目名稱:cohomeals,代碼行數:31,代碼來源:tiki-admin_toolbars.php

示例2: saveTool

 public static function saveTool($name, $label, $icon = 'img/icons/shading.png', $token = '', $syntax = '', $type = 'Inline', $plugin = '')
 {
     global $tikilib;
     $name = strtolower(TikiLib::remove_non_word_characters_and_accents($name));
     $standard_names = Toolbar::getList(false);
     $custom_list = Toolbar::getCustomList();
     if (in_array($name, $standard_names)) {
         // don't allow custom tools with the same name as standard ones
         $c = 1;
         while (in_array($name . '_' . $c, $custom_list)) {
             $c++;
         }
         $name = $name . '_' . $c;
     }
     $prefName = "toolbar_tool_{$name}";
     $data = array('name' => $name, 'label' => $label, 'icon' => $icon, 'token' => $token, 'syntax' => $syntax, 'type' => $type, 'plugin' => $plugin);
     $tikilib->set_preference($prefName, serialize($data));
     if (!in_array($name, $custom_list)) {
         $custom_list[] = $name;
         $tikilib->set_preference('toolbar_custom_list', serialize($custom_list));
     }
 }
開發者ID:rjsmelo,項目名稱:tiki,代碼行數:22,代碼來源:toolbarslib.php


注:本文中的Toolbar::getCustomList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。