當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。