本文整理汇总了PHP中Files::list_embeddable_for_anchor方法的典型用法代码示例。如果您正苦于以下问题:PHP Files::list_embeddable_for_anchor方法的具体用法?PHP Files::list_embeddable_for_anchor怎么用?PHP Files::list_embeddable_for_anchor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Files
的用法示例。
在下文中一共展示了Files::list_embeddable_for_anchor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$menu = array('images/edit.php?anchor=' . urlencode('section:' . $item['id']) => i18n::s('Add an image'));
$box .= Skin::build_list($menu, 'menu_bar');
}
if ($items = Images::list_by_date_for_anchor('section:' . $item['id'])) {
$box .= Skin::build_list($items, 'decorated');
}
if ($box) {
$text .= Skin::build_box(i18n::s('Images'), $box, 'folded');
}
// files
$box = '';
if (Files::allow_creation($item, $anchor, 'section')) {
$menu = array('files/edit.php?anchor=' . urlencode('section:' . $item['id']) => i18n::s('Add a file'));
$box .= Skin::build_list($menu, 'menu_bar');
}
if ($items = Files::list_embeddable_for_anchor('section:' . $item['id'], 0, 50)) {
$box .= Skin::build_list($items, 'decorated');
}
if ($box) {
$text .= Skin::build_box(i18n::s('Files'), $box, 'folded');
}
// locations
$box = '';
if (Locations::allow_creation($item, $anchor, 'section')) {
$menu = array('locations/edit.php?anchor=' . urlencode('section:' . $item['id']) => i18n::s('Add a location'));
$box .= Skin::build_list($menu, 'menu_bar');
}
if ($items = Locations::list_by_date_for_anchor('section:' . $item['id'], 0, 50, 'section:' . $item['id'])) {
$box .= Skin::build_list($items, 'decorated');
}
if ($box) {
示例2: array
$menu = array('images/edit.php?anchor=' . urlencode('article:' . $item['id']) => i18n::s('Add an image'));
$box .= Skin::build_list($menu, 'menu_bar');
}
if ($items = Images::list_by_date_for_anchor('article:' . $item['id'])) {
$box .= Skin::build_list($items, 'decorated');
}
if ($box) {
$text .= Skin::build_box(i18n::s('Images'), $box, 'folded');
}
// files
$box = '';
if ($cur_article->allows('creation', 'file')) {
$menu = array('files/edit.php?anchor=' . urlencode('article:' . $item['id']) => i18n::s('Add a file'));
$box .= Skin::build_list($menu, 'menu_bar');
}
if ($items = Files::list_embeddable_for_anchor('article:' . $item['id'], 0, 50)) {
$box .= Skin::build_list($items, 'decorated');
}
if ($box) {
$text .= Skin::build_box(i18n::s('Files'), $box, 'folded');
}
}
// display in a separate panel
if ($text) {
$panels[] = array('resources', i18n::s('Resources'), 'resources_panel', $text);
}
//
// options tab is visible only to site associates
//
if (Surfer::is_associate()) {
$text = '';