本文整理汇总了PHP中lms_steam::get_link_path方法的典型用法代码示例。如果您正苦于以下问题:PHP lms_steam::get_link_path方法的具体用法?PHP lms_steam::get_link_path怎么用?PHP lms_steam::get_link_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lms_steam
的用法示例。
在下文中一共展示了lms_steam::get_link_path方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_link_path_html
public static function get_link_path_html($obj, $offset = FALSE, $length = FALSE)
{
if (is_object($obj)) {
$link_path = lms_steam::get_link_path($obj, $offset);
} else {
if (is_array($obj)) {
if ($offset === FALSE) {
$link_path = $obj;
} else {
$index = array_search($offset, array_keys($obj));
if ($index === FALSE) {
return "";
}
if ($length === FALSE) {
$link_path = array_slice($obj, $index);
} else {
$link_path = array_slice($obj, $index, $length);
}
}
} else {
$link_path = array();
}
}
$container_path = "";
foreach ($link_path as $path_item) {
if (!empty($container_path)) {
$container_path .= " / ";
}
if (empty($path_item["link"])) {
$container_path .= $path_item["name"];
} else {
$container_path .= "<a href='" . $path_item["link"] . "'>" . h($path_item["name"]) . "</a>";
}
}
return $container_path;
}
示例2: str_replace
$content->setVariable("VALUE_VIEWED", str_replace("%x", count($readers), gettext("%x times")));
$content->setVariable("VALUE_SIZE", get_formatted_filesize($document->get_content_size()));
} else {
if ($document instanceof steam_container) {
// CONTAINER
$content->setCurrentBlock("BLOCK_CONTAINER");
$content->setVariable("LABEL_OBJECTCOUNT", gettext("Contents"));
$content->setVariable("VALUE_OBJECTCOUNT", str_replace("%COUNT", $document->count_inventory(), gettext("%COUNT Objects")));
$content->parse("BLOCK_CONTAINER");
} else {
// DOCEXTERN
$content->setCurrentBlock("BLOCK_DOCEXTERN");
$content->setVariable("LABEL_URL", gettext("URL"));
$content->setVariable("VALUE_URL", $document->get_attribute(DOC_EXTERN_URL));
$content->parse("BLOCK_DOCEXTERN");
}
}
$portal->set_rss_feed(PATH_URL . "services/feeds/document_public.php?id=" . $document->get_id(), gettext("Feed"), gettext("Subscribe to this document's newsfeed"));
$parent = $document->get_environment();
$link_path = -1;
if (is_object($parent)) {
$parent = koala_object::get_koala_object($parent);
if (is_object($parent) && $parent instanceof lms_wiki) {
$link_path = lms_steam::get_link_path($document);
}
}
if ($link_path === -1) {
$link_path = koala_object::get_koala_object($document)->get_link_path();
}
$portal->set_page_main($link_path, $content->get(), "");
$portal->show_html();