MDL-50970 core_block: New Web Service core_block_get_course_blocks
This commit is contained in:
@@ -319,6 +319,24 @@ class block_manager {
|
||||
return $this->visibleblockcontent[$region];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of block content objects for all the existings regions
|
||||
*
|
||||
* @param renderer_base $output the rendered to use
|
||||
* @return array of block block_contents objects for all the blocks in all regions.
|
||||
* @since Moodle 3.3
|
||||
*/
|
||||
public function get_content_for_all_regions($output) {
|
||||
$contents = array();
|
||||
$this->check_is_loaded();
|
||||
|
||||
foreach ($this->regions as $region => $val) {
|
||||
$this->ensure_content_created($region, $output);
|
||||
$contents[$region] = $this->visibleblockcontent[$region];
|
||||
}
|
||||
return $contents;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method used by get_content_for_region.
|
||||
* @param string $region region name
|
||||
|
||||
Reference in New Issue
Block a user