本文整理汇总了PHP中cm_info::set_no_view_link方法的典型用法代码示例。如果您正苦于以下问题:PHP cm_info::set_no_view_link方法的具体用法?PHP cm_info::set_no_view_link怎么用?PHP cm_info::set_no_view_link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cm_info
的用法示例。
在下文中一共展示了cm_info::set_no_view_link方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: folder_cm_info_dynamic
/**
* Sets dynamic information about a course module
*
* This function is called from cm_info when displaying the module
* mod_folder can be displayed inline on course page and therefore have no course link
*
* @param cm_info $cm
*/
function folder_cm_info_dynamic(cm_info $cm)
{
if ($cm->get_custom_data()) {
// the field 'customdata' is not empty IF AND ONLY IF we display contens inline
$cm->set_no_view_link();
}
}
示例2: dataform_cm_info_dynamic
/**
* Sets dynamic information about a course module
*
* This function is called from cm_info when displaying the module
* mod_dataform can be displayed inline on course page in which case it should not have course link
*
* @param cm_info $cm
*/
function dataform_cm_info_dynamic(cm_info $cm)
{
if ($customdata = $cm->customdata and !empty($customdata->inlineview)) {
// The field 'customdata' is not empty IF AND ONLY IF we display content inline.
$cm->set_no_view_link();
}
}