本文整理匯總了PHP中Computer::initForm方法的典型用法代碼示例。如果您正苦於以下問題:PHP Computer::initForm方法的具體用法?PHP Computer::initForm怎麽用?PHP Computer::initForm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Computer
的用法示例。
在下文中一共展示了Computer::initForm方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: showOperatingSystem
/**
* Print the computer's operating system form
*
* @param $comp Computer object
*
* @since version 9.1
*
* @return Nothing (call to classes members)
**/
static function showOperatingSystem(Computer $comp)
{
global $DB;
$ID = $comp->fields['id'];
$colspan = 4;
echo "<div class='center'>";
$comp->initForm($ID);
$comp->showFormHeader(['formtitle' => false]);
echo "<tr class='headerRow'><th colspan='" . $colspan . "'>";
echo __('Operating system');
echo "</th></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Name') . "</td>";
echo "<td>";
OperatingSystem::dropdown(array('value' => $comp->fields["operatingsystems_id"]));
echo "</td>";
echo "<td>" . __('Version') . "</td>";
echo "<td >";
OperatingSystemVersion::dropdown(array('value' => $comp->fields["operatingsystemversions_id"]));
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Architecture') . "</td>";
echo "<td >";
OperatingSystemArchitecture::dropdown(array('value' => $comp->fields["operatingsystemarchitectures_id"]));
echo "</td>";
echo "<td>" . __('Service pack') . "</td>";
echo "<td >";
OperatingSystemServicePack::dropdown(array('value' => $comp->fields["operatingsystemservicepacks_id"]));
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Kernel version') . "</td>";
echo "<td >";
Html::autocompletionTextField($comp, 'os_kernel_version');
echo "</td>";
echo "<td>" . __('Product ID') . "</td>";
echo "<td >";
Html::autocompletionTextField($comp, 'os_licenseid');
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Serial number') . "</td>";
echo "<td >";
Html::autocompletionTextField($comp, 'os_license_number');
echo "</td><td colspan='2'></td></tr>";
$comp->showFormButtons(array('candel' => false, 'formfooter' => false));
}