本文整理汇总了PHP中Album::setSortDirection方法的典型用法代码示例。如果您正苦于以下问题:PHP Album::setSortDirection方法的具体用法?PHP Album::setSortDirection怎么用?PHP Album::setSortDirection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Album
的用法示例。
在下文中一共展示了Album::setSortDirection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Gallery
<?php
// Create our gallery
$gallery = new Gallery();
// Create our album
if (!isset($_GET['album'])) {
die(gettext("No album provided to sort."));
} else {
$folder = strip($_GET['album']);
if (!isMyAlbum($folder, EDIT_RIGHTS)) {
die(gettext("You do not have rights to sort this album"));
}
$album = new Album($gallery, $folder);
if (isset($_GET['saved'])) {
$album->setSortType("manual");
$album->setSortDirection('image', 0);
$album->save();
}
// Layout the page
printLogoAndLinks();
?>
<div id="main"><?php
printTabs('edit');
?>
<div id="content">
<h1>Sort Album: <?php
echo $album->getTitle();
示例2: postAlbumSort
$gallery->save();
$notify = postAlbumSort(NULL);
if (isset($_POST['ids'])) {
$action = processAlbumBulkActions();
if (!empty($action)) {
$action = '&bulkmessage=' . $action;
}
}
header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit' . $action . '&saved' . $notify);
exit;
break;
case 'savesubalbumorder':
XSRFdefender('savealbumorder');
$album = new Album($gallery, $folder);
$album->setSubalbumSortType('manual');
$album->setSortDirection('album', 0);
$album->save();
$notify = postAlbumSort($album->get('id'));
if (isset($_POST['ids'])) {
$action = processAlbumBulkActions();
if (!empty($action)) {
$action = '&bulkmessage=' . $action;
}
}
header('Location: ' . FULLWEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit' . $action . '&album=' . $folder . '&tab=subalbuminfo&saved' . $notify);
exit;
break;
case 'sorttags':
if (isset($_GET['subpage'])) {
$pg = '&subpage=' . $_GET['subpage'];
$tab = '&tab=imageinfo';