本文整理匯總了PHP中wiki_search_form函數的典型用法代碼示例。如果您正苦於以下問題:PHP wiki_search_form函數的具體用法?PHP wiki_search_form怎麽用?PHP wiki_search_form使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了wiki_search_form函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* page_wiki constructor
*
* @param $wiki. Current wiki
* @param $subwiki. Current subwiki.
* @param $cm. Current course_module.
*/
function __construct($wiki, $subwiki, $cm) {
global $PAGE, $CFG;
$this->subwiki = $subwiki;
$this->modcontext = context_module::instance($PAGE->cm->id);
// initialise wiki renderer
$this->wikioutput = $PAGE->get_renderer('mod_wiki');
$PAGE->set_cacheable(true);
$PAGE->set_cm($cm);
$PAGE->set_activity_record($wiki);
// the search box
$PAGE->set_button(wiki_search_form($cm));
}
示例2: __construct
/**
* page_wiki constructor
*
* @param $wiki. Current wiki
* @param $subwiki. Current subwiki.
* @param $cm. Current course_module.
*/
function __construct($wiki, $subwiki, $cm)
{
global $PAGE, $CFG;
$this->subwiki = $subwiki;
$this->cm = $cm;
$this->modcontext = context_module::instance($this->cm->id);
// initialise wiki renderer
$this->wikioutput = $PAGE->get_renderer('mod_wiki');
$PAGE->set_cacheable(true);
$PAGE->set_cm($cm);
$PAGE->set_activity_record($wiki);
// the search box
if (!empty($subwiki->id)) {
$search = optional_param('searchstring', null, PARAM_TEXT);
$PAGE->set_button(wiki_search_form($cm, $search, $subwiki));
}
}