PMA\libraries\Util::showMySQLDocu PHP Method

showMySQLDocu() public static method

Displays a link to the official MySQL documentation
public static showMySQLDocu ( string $link, boolean $big_icon = false, string $anchor = '', boolean $just_open = false ) : string
$link string contains name of page/anchor that is being linked
$big_icon boolean whether to use big icon (like in left frame)
$anchor string anchor to page part
$just_open boolean whether only the opening tag should be returned
return string the html link
    public static function showMySQLDocu($link, $big_icon = false, $anchor = '', $just_open = false)
    {
        $url = self::getMySQLDocuURL($link, $anchor);
        $open_link = '<a href="' . $url . '" target="mysql_doc">';
        if ($just_open) {
            return $open_link;
        } elseif ($big_icon) {
            return $open_link . self::getImage('b_sqlhelp.png', __('Documentation')) . '</a>';
        } else {
            return self::showDocLink($url, 'mysql_doc');
        }
    }

Usage Example

コード例 #1
0
 /**
  * Index action
  *
  * @return void
  */
 public function indexAction()
 {
     $request = Request::getInstance();
     if ($request->isAjax() && isset($_REQUEST['type']) && $_REQUEST['type'] === 'getval') {
         $this->getValueAction();
         return;
     }
     if ($request->isAjax() && isset($_REQUEST['type']) && $_REQUEST['type'] === 'setval') {
         $this->setValueAction();
         return;
     }
     include 'libraries/server_common.inc.php';
     $header = $this->response->getHeader();
     $scripts = $header->getScripts();
     $scripts->addFile('server_variables.js');
     /**
      * Displays the sub-page heading
      */
     $doc_link = Util::showMySQLDocu('server_system_variables');
     $this->response->addHtml(PMA_getHtmlForSubPageHeader('variables', $doc_link));
     /**
      * Sends the queries and buffers the results
      */
     $serverVarsResult = $this->dbi->tryQuery('SHOW SESSION VARIABLES;');
     if ($serverVarsResult !== false) {
         $serverVarsSession = array();
         while ($arr = $this->dbi->fetchRow($serverVarsResult)) {
             $serverVarsSession[$arr[0]] = $arr[1];
         }
         $this->dbi->freeResult($serverVarsResult);
         $serverVars = $this->dbi->fetchResult('SHOW GLOBAL VARIABLES;', 0, 1);
         /**
          * Link templates
          */
         $this->response->addHtml($this->_getHtmlForLinkTemplates());
         /**
          * Displays the page
          */
         $this->response->addHtml($this->_getHtmlForServerVariables($serverVars, $serverVarsSession));
     } else {
         /**
          * Display the error message
          */
         $this->response->addHTML(Message::error(sprintf(__('Not enough privilege to view server variables and ' . 'settings. %s'), Util::showMySQLDocu('server-system-variables', false, 'sysvar_show_compatibility_56')))->getDisplay());
     }
 }
All Usage Examples Of PMA\libraries\Util::showMySQLDocu
Util