本文整理汇总了PHP中PMA_RecentFavoriteTable::getHtmlList方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_RecentFavoriteTable::getHtmlList方法的具体用法?PHP PMA_RecentFavoriteTable::getHtmlList怎么用?PHP PMA_RecentFavoriteTable::getHtmlList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_RecentFavoriteTable
的用法示例。
在下文中一共展示了PMA_RecentFavoriteTable::getHtmlList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_synchronizeFavoriteTables
/**
* Synchronize favorite tables
*
* @param PMA_RecentFavoriteTable $fav_instance Instance of this class
* @param string $user The user hash
* @param array $favorite_tables Existing favorites
*
* @return void
*/
function PMA_synchronizeFavoriteTables($fav_instance, $user, $favorite_tables)
{
$fav_instance_tables = $fav_instance->getTables();
if (empty($fav_instance_tables) && isset($favorite_tables[$user])) {
foreach ($favorite_tables[$user] as $key => $value) {
$fav_instance->add($value['db'], $value['table']);
}
}
$favorite_tables[$user] = $fav_instance->getTables();
$ajax_response = PMA_Response::getInstance();
$ajax_response->addJSON('favorite_tables', json_encode($favorite_tables));
$ajax_response->addJSON('list', $fav_instance->getHtmlList());
$server_id = $GLOBALS['server'];
// Set flag when localStorage and pmadb(if present) are in sync.
$_SESSION['tmpval']['favorites_synced'][$server_id] = true;
}