public function get_enrolment_instances($onlyenabled = false) {
        if ($this->_instances === null) {
            $this->_instances = enrol_get_instances($this->course->id, $onlyenabled);
        }
        return $this->_instances;
    }
public function get_enrolment_instances($onlyenabled = false) {
        if ($this->_instances === null) {
            $this->_instances = enrol_get_instances($this->course->id, $onlyenabled);
        }
        return $this->_instances;
    }
public function get_enrolment_instances ( $ onlyenabled = false ) { if ( $ this -> _instances === null ) { $ this -> _instances = enrol_get_instances ( $ this -> course -> id , $ onlyenabled ) ; } return $ this -> _instances ; }
Returns all of the enrolment instances for this course.

@param bool $onlyenabled Whether to return data from enabled enrolment instance names only.
@return array
Returns all of the enrolment instances for this course .