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


PHP Label::format方法代码示例

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


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

示例1: array

         $playlist->format(false);
         $results[] = array('type' => T_('Playlists'), 'link' => $playlist->link, 'label' => $playlist->name, 'value' => $playlist->name, 'rels' => '', 'image' => '');
     }
 }
 if (($target == 'anywhere' || $target == 'label') && AmpConfig::get('label')) {
     $searchreq = array('limit' => $limit, 'type' => 'label', 'rule_1_input' => $search, 'rule_1_operator' => '2', 'rule_1' => 'name');
     $sres = Search::run($searchreq);
     // Litmit not reach, new search with another operator
     if (count($sres) < $limit) {
         $searchreq['limit'] = $limit - count($sres);
         $searchreq['rule_1_operator'] = '0';
         $sres = array_unique(array_merge($sres, Search::run($searchreq)));
     }
     foreach ($sres as $id) {
         $label = new Label($id);
         $label->format(false);
         $results[] = array('type' => T_('Labels'), 'link' => $label->link, 'label' => $label->name, 'value' => $label->name, 'rels' => '', 'image' => Art::url($label->id, 'label', null, 10));
     }
 }
 if ($target == 'missing_artist' && AmpConfig::get('wanted')) {
     $sres = Wanted::search_missing_artists($search);
     $i = 0;
     foreach ($sres as $r) {
         $results[] = array('type' => T_('Missing Artists'), 'link' => AmpConfig::get('web_path') . '/artists.php?action=show_missing&mbid=' . $r['mbid'], 'label' => $r['name'], 'value' => $r['name'], 'rels' => '', 'image' => '');
         $i++;
         if ($i >= $limit) {
             break;
         }
     }
 }
 if ($target == 'user' && AmpConfig::get('sociable')) {
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:search.ajax.php

示例2: T_

            <th class="cel_artists optional"><?php 
echo T_('Artists');
?>
</th>
            <th class="cel_action essential"><?php 
echo T_('Action');
?>
</th>
        </tr>
    </thead>
    <tbody>
        <?php 
/* Foreach through every label that has been passed to us */
foreach ($object_ids as $label_id) {
    $libitem = new Label($label_id);
    $libitem->format();
    ?>
        <tr id="label_<?php 
    echo $libitem->id;
    ?>
" class="<?php 
    echo UI::flip_class();
    ?>
">
            <?php 
    require AmpConfig::get('prefix') . UI::find_template('show_label_row.inc.php');
    ?>
        </tr>
        <?php 
}
?>
开发者ID:cheese1,项目名称:ampache,代码行数:31,代码来源:show_labels.inc.php

示例3: intval

        } else {
            $body = T_('Label Added');
            $title = '';
            show_confirmation($title, $body, AmpConfig::get('web_path') . '/browse.php?action=label');
        }
        break;
    case 'show':
        $label_id = intval($_REQUEST['label']);
        if (!$label_id) {
            if (!empty($_REQUEST['name'])) {
                $label_id = Label::lookup($_REQUEST);
            }
        }
        if ($label_id > 0) {
            $label = new Label($label_id);
            $label->format();
            $object_ids = $label->get_artists();
            $object_type = 'artist';
            require_once AmpConfig::get('prefix') . UI::find_template('show_label.inc.php');
            UI::show_footer();
            exit;
        }
    case 'show_add_label':
        if (Access::check('interface', '50') || AmpConfig::get('upload_allow_edit')) {
            require_once AmpConfig::get('prefix') . UI::find_template('show_add_label.inc.php');
        } else {
            echo T_('Label cannot be found.');
        }
        break;
}
// end switch
开发者ID:ivan801,项目名称:ampache,代码行数:31,代码来源:labels.php


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