本文整理汇总了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')) {
示例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
}
?>
示例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