本文整理匯總了PHP中comment::comment_area方法的典型用法代碼示例。如果您正苦於以下問題:PHP comment::comment_area方法的具體用法?PHP comment::comment_area怎麽用?PHP comment::comment_area使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類comment
的用法示例。
在下文中一共展示了comment::comment_area方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: js
/**
* Print required YUI libraries, must be called before html head printed
* @return boolean
*/
public static function js()
{
global $PAGE, $CFG;
// setup variables for non-js interface
self::$nonjs = optional_param('nonjscomment', '', PARAM_ALPHA);
self::$comment_itemid = optional_param('comment_itemid', '', PARAM_INT);
self::$comment_context = optional_param('comment_context', '', PARAM_INT);
self::$comment_area = optional_param('comment_area', '', PARAM_ALPHAEXT);
$PAGE->requires->yui_lib('yahoo')->in_head();
$PAGE->requires->yui_lib('dom')->in_head();
$PAGE->requires->yui_lib('event')->in_head();
$PAGE->requires->yui_lib('animation')->in_head();
$PAGE->requires->yui_lib('json')->in_head();
$PAGE->requires->yui_lib('connection')->in_head();
$PAGE->requires->js('comment/comment.js')->in_head();
$PAGE->requires->string_for_js('addcomment', 'moodle');
$PAGE->requires->string_for_js('deletecomment', 'moodle');
}
示例2: init
/**
* Receive nonjs comment parameters
*
* @param moodle_page $page The page object to initialise comments within
* If not provided the global $PAGE is used
*/
public static function init(moodle_page $page = null)
{
global $PAGE;
if (empty($page)) {
$page = $PAGE;
}
// setup variables for non-js interface
self::$nonjs = optional_param('nonjscomment', '', PARAM_ALPHANUM);
self::$comment_itemid = optional_param('comment_itemid', '', PARAM_INT);
self::$comment_context = optional_param('comment_context', '', PARAM_INT);
self::$comment_page = optional_param('comment_page', '', PARAM_INT);
self::$comment_area = optional_param('comment_area', '', PARAM_AREA);
$page->requires->string_for_js('addcomment', 'moodle');
$page->requires->string_for_js('deletecomment', 'moodle');
$page->requires->string_for_js('comments', 'moodle');
$page->requires->string_for_js('commentsrequirelogin', 'moodle');
}
示例3: init
/**
* Receive nonjs comment parameters
*/
public static function init()
{
global $PAGE, $CFG;
// setup variables for non-js interface
self::$nonjs = optional_param('nonjscomment', '', PARAM_ALPHA);
self::$comment_itemid = optional_param('comment_itemid', '', PARAM_INT);
self::$comment_context = optional_param('comment_context', '', PARAM_INT);
self::$comment_page = optional_param('comment_page', '', PARAM_INT);
self::$comment_area = optional_param('comment_area', '', PARAM_ALPHAEXT);
$PAGE->requires->string_for_js('addcomment', 'moodle');
$PAGE->requires->string_for_js('deletecomment', 'moodle');
$PAGE->requires->string_for_js('comments', 'moodle');
$PAGE->requires->string_for_js('commentsrequirelogin', 'moodle');
}