本文整理汇总了PHP中course_enrolment_manager::get_filtered_enrolment_plugin方法的典型用法代码示例。如果您正苦于以下问题:PHP course_enrolment_manager::get_filtered_enrolment_plugin方法的具体用法?PHP course_enrolment_manager::get_filtered_enrolment_plugin怎么用?PHP course_enrolment_manager::get_filtered_enrolment_plugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类course_enrolment_manager
的用法示例。
在下文中一共展示了course_enrolment_manager::get_filtered_enrolment_plugin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs the table
*
* @param course_enrolment_manager $manager
*/
public function __construct(course_enrolment_manager $manager)
{
$this->manager = $manager;
$this->page = optional_param(self::PAGEVAR, 0, PARAM_INT);
$this->perpage = optional_param(self::PERPAGEVAR, self::DEFAULTPERPAGE, PARAM_INT);
$this->sort = optional_param(self::SORTVAR, self::DEFAULTSORT, PARAM_ALPHANUM);
$this->sortdirection = optional_param(self::SORTDIRECTIONVAR, self::DEFAULTSORTDIRECTION, PARAM_ALPHA);
$this->attributes = array('class' => 'userenrolment');
if (!in_array($this->sort, self::$sortablefields)) {
$this->sort = self::DEFAULTSORT;
}
if ($this->page < 0) {
$this->page = 0;
}
if ($this->sortdirection !== 'ASC' && $this->sortdirection !== 'DESC') {
$this->sortdirection = self::DEFAULTSORTDIRECTION;
}
$this->id = html_writer::random_id();
// Collect the bulk operations for the currently filtered plugin if there is one.
$plugin = $manager->get_filtered_enrolment_plugin();
if ($plugin and enrol_is_enabled($plugin->get_name())) {
$this->bulkoperations = $plugin->get_bulk_operations($manager);
}
}