當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Browse::add_supplemental_object方法代碼示例

本文整理匯總了PHP中Browse::add_supplemental_object方法的典型用法代碼示例。如果您正苦於以下問題:PHP Browse::add_supplemental_object方法的具體用法?PHP Browse::add_supplemental_object怎麽用?PHP Browse::add_supplemental_object使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Browse的用法示例。


在下文中一共展示了Browse::add_supplemental_object方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Playlist

 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
define('AJAX_INCLUDE', '1');
require_once '../lib/init.php';
debug_event('refresh_reordered.server.php', 'Called for action: {' . $_REQUEST['action'] . '}', '5');
/* Switch on the action passed in */
switch ($_REQUEST['action']) {
    case 'refresh_playlist_medias':
        $playlist = new Playlist($_REQUEST['id']);
        $playlist->format();
        $object_ids = $playlist->get_items();
        $browse = new Browse();
        $browse->set_type('playlist_media');
        $browse->add_supplemental_object('playlist', $playlist->id);
        $browse->set_static_content(true);
        $browse->show_objects($object_ids);
        $browse->store();
        break;
    case 'refresh_album_songs':
        $browse = new Browse();
        $browse->set_show_header(true);
        $browse->set_type('song');
        $browse->set_simple_browse(true);
        $browse->set_filter('album', $_REQUEST['id']);
        $browse->set_sort('track', 'ASC');
        $browse->get_objects();
        echo "<div id='browse_content_song' class='browse_content'>";
        $browse->show_objects(null, true);
        // true argument is set to show the reorder column
開發者ID:bl00m,項目名稱:ampache,代碼行數:31,代碼來源:refresh_reordered.server.php

示例2: T_

?>
/smartplaylist.php?action=update_playlist&playlist_id=<?php 
echo $playlist->id;
?>
" enctype="multipart/form-data" style="Display:inline">
    <?php 
require AmpConfig::get('prefix') . '/templates/show_rules.inc.php';
?>
    <div class="formValidation">
        <input class="button" type="submit" value="<?php 
echo T_('Save Changes');
?>
" />
    </div>
</form>

<?php 
UI::show_box_bottom();
?>

<div>
<?php 
$browse = new Browse();
$browse->set_type('playlist_song');
$browse->add_supplemental_object('search', $playlist->id);
$browse->set_static_content(false);
$browse->show_objects($object_ids);
$browse->store();
?>
</div>
開發者ID:nioc,項目名稱:ampache,代碼行數:30,代碼來源:show_search.inc.php


注:本文中的Browse::add_supplemental_object方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。