roelmann / moodle-theme_flexibase

NOTE - Versions from the Moodle plugins database will be found in the STABLE branches of this repository. The Master branch is development work and not guaranteed at any point - It should only ever be used on a development/test environment. The MASTER branch is now being developed on Mdl3.1 and while testing will be maintained on 3.0 prior to any updated releases in the plugins database, the MASTER branch cannot be guaranteed at any stage. PLEASE ALWAYS USE STABLE BRANCHES FOR PRODUCTION siTES
7 stars 7 forks source link

update block method #69

Closed roelmann closed 8 years ago

roelmann commented 8 years ago

$OUTPUT->blocks_for_region should be $OUTPUT->blocks

gjb2048 commented 8 years ago

Would it make more sense to have a custom method $OUTPUT->lego() ? ;)

roelmann commented 8 years ago

blocks_for_region is only used as a function in core_renderer, the layout files all already use $OUTPUT->blocks. Cannot locate any $OUTPUT->blocks_for_region as reported The blocks_for_region function is a direct upstream copy from decaf re awesomebar therefore will not be changed in flexibase.

public function blocks_for_region($region) {
    global $USER;
    $blocks = $this->page->blocks->get_blocks_for_region($region);
    $blockcontents = theme_flexibase_block_manager::get_filtered_content($this->page->blocks, $this, $region);

public function blocks_for_region($region) {
    global $USER;
    $blockswanted = array();
    $blocks = $this->page->blocks->get_blocks_for_region($region);
    $blockcontents = theme_decaf_block_manager::get_filtered_content($this->page->blocks, $this, $region);