本文整理汇总了PHP中Help::get_text方法的典型用法代码示例。如果您正苦于以下问题:PHP Help::get_text方法的具体用法?PHP Help::get_text怎么用?PHP Help::get_text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Help
的用法示例。
在下文中一共展示了Help::get_text方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Help
</p>
</section>';
/*
* Start the Masonry.js wrapper
*/
$sidebar .= '<div class="grouping js-masonry"
data-masonry-options=\'{
"itemSelector": ".grid-box",
"columnWidth": ".grid-sizer",
"gutter": 10 }\'>';
/*
* Get the help text for the requested page.
*/
$help = new Help();
// The help text is now available, as a JSON object, as $help->get_text()
$sidebar .= '<p class="keyboard"><a id="keyhelp">' . $help->get_text('keyboard')->title . '</a></p>';
/*
* If this section has been cited in any court decisions, list them.
*/
if (isset($law->court_decisions) && $law->court_decisions != FALSE) {
$sidebar .= '<section class="grid-box grid-sizer" id="court-decisions">
<h1>Court Decisions</h1>
<ul>';
foreach ($law->court_decisions as $decision) {
$sidebar .= '<li><a href="' . $decision->url . '"><em>' . $decision->name . '</em></a> (' . $decision->court_html . ', ' . date('m/d/y', strtotime($decision->date)) . ')';
if (isset($decision->abstract)) {
$sidebar .= '<br />' . $decision->abstract;
}
$sidebar .= '</li>';
}
$sidebar .= '</ul>