本文整理匯總了PHP中format_base::supports_ajax方法的典型用法代碼示例。如果您正苦於以下問題:PHP format_base::supports_ajax方法的具體用法?PHP format_base::supports_ajax怎麽用?PHP format_base::supports_ajax使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類format_base
的用法示例。
在下文中一共展示了format_base::supports_ajax方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: supports_ajax
/**
* Returns the information about the ajax support in the given source format
*
* This function calls function callback_FORMATNAME_ajax_support() if it exists
*
* The returned object's property (boolean)capable indicates that
* the course format supports Moodle course ajax features.
*
* @return stdClass
*/
public function supports_ajax()
{
// set up default values
$ajaxsupport = parent::supports_ajax();
// get the information from the course format library
$featurefunction = 'callback_' . $this->format . '_ajax_support';
if (function_exists($featurefunction)) {
$formatsupport = $featurefunction();
if (isset($formatsupport->capable)) {
$ajaxsupport->capable = $formatsupport->capable;
}
}
return $ajaxsupport;
}