本文整理汇总了PHP中comment::comment_itemid方法的典型用法代码示例。如果您正苦于以下问题:PHP comment::comment_itemid方法的具体用法?PHP comment::comment_itemid怎么用?PHP comment::comment_itemid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comment
的用法示例。
在下文中一共展示了comment::comment_itemid方法的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');
}