本文整理汇总了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
示例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>