当前位置: 首页>>代码示例>>PHP>>正文


PHP Label::get_display方法代码示例

本文整理汇总了PHP中Label::get_display方法的典型用法代码示例。如果您正苦于以下问题:PHP Label::get_display方法的具体用法?PHP Label::get_display怎么用?PHP Label::get_display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Label的用法示例。


在下文中一共展示了Label::get_display方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

/**
 * Sub-Ajax page, requires AJAX_INCLUDE
 */
if (!defined('AJAX_INCLUDE')) {
    exit;
}
$results = array();
switch ($_REQUEST['action']) {
    case 'show_add_tag':
        break;
    case 'get_tag_map':
        $tags = Tag::get_display(Tag::get_tags());
        $results['tags'] = $tags;
        break;
    case 'get_labels':
        $labels = Label::get_display(Label::get_all_labels());
        $results['labels'] = $labels;
        break;
    case 'add_tag':
        debug_event('tag.ajax', 'Adding new tag...', '5');
        Tag::add_tag_map($_GET['type'], $_GET['object_id'], $_GET['tag_id']);
        break;
    case 'add_tag_by_name':
        debug_event('tag.ajax', 'Adding new tag by name...', '5');
        Tag::add($_GET['type'], $_GET['object_id'], $_GET['tag_name'], false);
        break;
    case 'delete':
        debug_event('tag.ajax', 'Deleting tag...', '5');
        $tag = new Tag($_GET['tag_id']);
        $tag->delete();
        header('Location: ' . AmpConfig::get('web_path') . '/browse.php?action=tag');
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:tag.ajax.php

示例2: T_

</td>
                <td><input type="text" name="edit_tags" id="edit_tags" value="<?php 
echo Tag::get_display($libitem->tags);
?>
" /></td>
            </tr>
            <?php 
if (AmpConfig::get('label')) {
    ?>
            <tr>
                <td class="edit_dialog_content_header"><?php 
    echo T_('Labels');
    ?>
</td>
                <td><input type="text" name="edit_labels" id="edit_labels" value="<?php 
    echo Label::get_display($libitem->labels);
    ?>
" /></td>
            </tr>
            <?php 
}
?>
            <tr>
                <td class="edit_dialog_content_header"></td>
                <td><input type="checkbox" name="overwrite_childs" value="checked" />&nbsp;<?php 
echo T_('Overwrite tags of sub albums and sub songs');
?>
</td>
            </tr>
            <tr>
                <td class="edit_dialog_content_header"></td>
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:show_edit_artist_row.inc.php

示例3: format

 /**
  * format
  * this function takes an array of artist
  * information and reformats the relevent values
  * so they can be displayed in a table for example
  * it changes the title into a full link.
  * @return boolean
  */
 public function format($details = true, $limit_threshold = '')
 {
     /* Combine prefix and name, trim then add ... if needed */
     $name = trim($this->prefix . " " . $this->name);
     $this->f_name = $name;
     $this->f_full_name = trim(trim($this->prefix) . ' ' . trim($this->name));
     // If this is a memory-only object, we're done here
     if (!$this->id) {
         return true;
     }
     if ($this->catalog_id) {
         $this->link = AmpConfig::get('web_path') . '/artists.php?action=show&catalog=' . $this->catalog_id . '&artist=' . $this->id;
         $this->f_link = "<a href=\"" . $this->link . "\" title=\"" . $this->f_full_name . "\">" . $name . "</a>";
     } else {
         $this->link = AmpConfig::get('web_path') . '/artists.php?action=show&artist=' . $this->id;
         $this->f_link = "<a href=\"" . $this->link . "\" title=\"" . $this->f_full_name . "\">" . $name . "</a>";
     }
     if ($details) {
         // Get the counts
         $extra_info = $this->_get_extra_info($this->catalog_id, $limit_threshold);
         //Format the new time thingy that we just got
         $min = sprintf("%02d", floor($extra_info['time'] / 60) % 60);
         $sec = sprintf("%02d", $extra_info['time'] % 60);
         $hours = floor($extra_info['time'] / 3600);
         $this->f_time = ltrim($hours . ':' . $min . ':' . $sec, '0:');
         $this->tags = Tag::get_top_tags('artist', $this->id);
         $this->f_tags = Tag::get_display($this->tags, true, 'artist');
         if (AmpConfig::get('label')) {
             $this->labels = Label::get_labels($this->id);
             $this->f_labels = Label::get_display($this->labels, true);
         }
         $this->object_cnt = $extra_info['object_cnt'];
     }
     return true;
 }
开发者ID:bl00m,项目名称:ampache,代码行数:43,代码来源:artist.class.php


注:本文中的Label::get_display方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。