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


PHP ObjectLock::getLockableObjects方法代码示例

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


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

示例1: showFormDisplay


//.........这里部分代码省略.........
     }
     echo "<div class='center' id='tabsbody'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='4'>" . __('General setup') . "</th></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('URL of the application') . "</td>";
     echo "<td colspan='3'><input type='text' name='url_base' size='80' value='" . $CFG_GLPI["url_base"] . "'>";
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td> " . __('Text in the login box') . "</td>";
     echo "<td colspan='3'>";
     echo "<textarea cols='70' rows='4' name='text_login'>" . $CFG_GLPI["text_login"] . "</textarea>";
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td width='30%'> " . __('Allow FAQ anonymous access') . "</td><td  width='20%'>";
     Dropdown::showYesNo("use_public_faq", $CFG_GLPI["use_public_faq"]);
     echo "</td><td width='30%'>" . __('Simplified interface help link') . "</td>";
     echo "<td><input size='22' type='text' name='helpdesk_doc_url' value='" . $CFG_GLPI["helpdesk_doc_url"] . "'></td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Default search results limit (page)') . "</td><td>";
     Dropdown::showNumber("list_limit_max", array('value' => $CFG_GLPI["list_limit_max"], 'min' => 5, 'max' => 200, 'step' => 5));
     echo "</td><td>" . __('Standard interface help link') . "</td>";
     echo "<td><input size='22' type='text' name='central_doc_url' value='" . $CFG_GLPI["central_doc_url"] . "'></td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Default characters limit (summary text boxes)') . "</td><td>";
     Dropdown::showNumber('cut', array('value' => $CFG_GLPI["cut"], 'min' => 50, 'max' => 500, 'step' => 50));
     echo "</td><td>" . __('Default url length limit') . "</td><td>";
     Dropdown::showNumber('url_maxlength', array('value' => $CFG_GLPI["url_maxlength"], 'min' => 20, 'max' => 80, 'step' => 5));
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'><td>" . __('Default decimals limit') . "</td><td>";
     Dropdown::showNumber("decimal_number", array('value' => $CFG_GLPI["decimal_number"], 'min' => 1, 'max' => 4));
     echo "</td><td>" . __('Default chart format') . "</td><td>";
     Dropdown::showFromArray("default_graphtype", array('png' => 'PNG', 'svg' => 'SVG'), array('value' => $CFG_GLPI["default_graphtype"]));
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __("Translation of dropdowns") . "</td><td>";
     Dropdown::showYesNo("translate_dropdowns", $CFG_GLPI["translate_dropdowns"]);
     echo "</td>";
     echo "<td>" . __("Knowledge base translation") . "</td><td>";
     Dropdown::showYesNo("translate_kb", $CFG_GLPI["translate_kb"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'><td colspan='4' class='center b'>" . __('Dynamic display') . "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Page size for dropdown (paging using scroll)') . "</td><td>";
     Dropdown::showNumber('dropdown_max', array('value' => $CFG_GLPI["dropdown_max"], 'min' => 0, 'max' => 200));
     echo "</td>";
     echo "<td>" . __('Autocompletion of text fields') . "</td><td>";
     Dropdown::showYesNo("use_ajax_autocompletion", $CFG_GLPI["use_ajax_autocompletion"]);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __("Don't show search engine in dropdowns if the number of items is less than") . "</td><td>";
     Dropdown::showNumber('ajax_limit_count', array('value' => $CFG_GLPI["ajax_limit_count"], 'min' => 1, 'max' => 200, 'step' => 1, 'toadd' => array(0 => __('Never'))));
     echo "<td colspan='2'></td>";
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'><td colspan='4' class='center b'>" . __('Search engine') . "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Items seen') . "</td><td>";
     $values = array(0 => __('No'), 1 => sprintf(__('%1$s (%2$s)'), __('Yes'), __('last criterion')), 2 => sprintf(__('%1$s (%2$s)'), __('Yes'), __('default criterion')));
     Dropdown::showFromArray('allow_search_view', $values, array('value' => $CFG_GLPI['allow_search_view']));
     echo "</td><td>" . __('Global search') . "</td><td>";
     if ($CFG_GLPI['allow_search_view']) {
         Dropdown::showYesNo('allow_search_global', $CFG_GLPI['allow_search_global']);
     } else {
         echo Dropdown::getYesNo(0);
     }
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('All') . "</td><td>";
     $values = array(0 => __('No'), 1 => sprintf(__('%1$s (%2$s)'), __('Yes'), __('last criterion')));
     Dropdown::showFromArray('allow_search_all', $values, array('value' => $CFG_GLPI['allow_search_all']));
     echo "</td><td colspan='2'></td></tr>";
     echo "<tr class='tab_bg_1'><td colspan='4' class='center b'>" . __('Item locks') . "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Use locks') . "</td><td>";
     Dropdown::showYesNo("lock_use_lock_item", $CFG_GLPI["lock_use_lock_item"]);
     echo "</td><td>" . __('Profile to be used when locking items') . "</td><td>";
     if ($CFG_GLPI["lock_use_lock_item"]) {
         Profile::dropdown(array('name' => 'lock_lockprofile_id', 'display_emptychoice' => true, 'value' => $CFG_GLPI['lock_lockprofile_id']));
     } else {
         echo dropdown::getDropdownName(Profile::getTable(), $CFG_GLPI['lock_lockprofile_id']);
     }
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('List of items to lock') . "</td>";
     echo "<td  colspan=3>";
     Dropdown::showFromArray('lock_item_list', ObjectLock::getLockableObjects(), array('values' => $CFG_GLPI['lock_item_list'], 'width' => '100%', 'multiple' => true, 'readonly' => !$CFG_GLPI["lock_use_lock_item"]));
     echo "</td></tr>";
     if ($canedit) {
         echo "<tr class='tab_bg_2'>";
         echo "<td colspan='4' class='center'>";
         echo "<input type='submit' name='update' class='submit' value=\"" . _sx('button', 'Save') . "\">";
         echo "</td></tr>";
     }
     echo "</table></div>";
     Html::closeForm();
 }
开发者ID:glpi-project,项目名称:glpi,代码行数:101,代码来源:config.class.php


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