PMA\libraries\RecentFavoriteTable::getHtmlUpdateRecentTables PHP Method

getHtmlUpdateRecentTables() public static method

Generate Html to update recent tables.
public static getHtmlUpdateRecentTables ( ) : string
return string html
    public static function getHtmlUpdateRecentTables()
    {
        $params = array('ajax_request' => true, 'recent_table' => true);
        $url = 'index.php' . URL::getCommon($params);
        $retval = '<a class="hide" id="update_recent_tables"';
        $retval .= ' href="' . $url . '"></a>';
        return $retval;
    }

Usage Example

示例#1
0
 /**
  * Add recently used table and reload the navigation.
  *
  * @param string $db    Database name where the table is located.
  * @param string $table The table name
  *
  * @return string
  */
 private function _addRecentTable($db, $table)
 {
     $retval = '';
     if ($this->_menuEnabled && mb_strlen($table) && $GLOBALS['cfg']['NumRecentTables'] > 0) {
         $tmp_result = RecentFavoriteTable::getInstance('recent')->add($db, $table);
         if ($tmp_result === true) {
             $retval = RecentFavoriteTable::getHtmlUpdateRecentTables();
         } else {
             $error = $tmp_result;
             $retval = $error->getDisplay();
         }
     }
     return $retval;
 }