Returns link to documentation
public getDocLink ( string $path ) : string | ||
$path | string | Path to documentation |
Результат | string |
/** * Test for FormDisplay::getDocLink * * @return void */ public function testGetDocLink() { $this->assertEquals("./url.php?url=https%3A%2F%2Fdocs.phpmyadmin.net%2Fen%2Flatest%2F" . "config.html%23cfg_Servers_3_test_2_", $this->object->getDocLink("Servers/3/test/2/")); $this->assertEquals('', $this->object->getDocLink("Import")); $this->assertEquals('', $this->object->getDocLink("Export")); }
echo '<input type="submit" name="submit" value="', __('New server'), '" />'; echo '</td>'; echo '</tr>'; echo '</table>'; echo '</div>'; echo PMA_displayFormBottom(); echo '</fieldset>'; echo '<fieldset class="simple"><legend>', __('Configuration file'), '</legend>'; // // Display config file settings and load/save form // $form_display = new FormDisplay($cf); echo PMA_displayFormTop('config.php'); echo '<table width="100%" cellspacing="0">'; // Display language list $opts = array('doc' => $form_display->getDocLink('DefaultLang'), 'values' => array(), 'values_escaped' => true); foreach ($all_languages as $each_lang) { $opts['values'][$each_lang->getCode()] = $each_lang->getName(); } echo PMA_displayInput('DefaultLang', __('Default language'), 'select', $cf->getValue('DefaultLang'), '', true, $opts); // Display server list $opts = array('doc' => $form_display->getDocLink('ServerDefault'), 'values' => array(), 'values_disabled' => array()); if ($cf->getServerCount() > 0) { $opts['values']['0'] = __('let the user choose'); $opts['values']['-'] = '------------------------------'; if ($cf->getServerCount() == 1) { $opts['values_disabled'][] = '0'; } $opts['values_disabled'][] = '-'; foreach ($cf->getServers() as $id => $server) { $opts['values'][(string) $id] = $cf->getServerName($id) . " [{$id}]";