original_string: public function ensure_content_created($region, $output) {
          $this->ensure_instances_exist($region);
          if (!array_key_exists($region, $this->visibleblockcontent)) {
              $contents = array();
              if (array_key_exists($region, $this->extracontent)) {
                  $contents = $this->extracontent[$region];
              }
              $contents = array_merge($contents, $this->create_block_contents($this->blockinstances[$region], $output, $region));
              if (($region == $this->defaultregion) && (!isset($this->page->theme->addblockposition) ||
                      $this->page->theme->addblockposition == BLOCK_ADDBLOCK_POSITION_DEFAULT)) {
                  $addblockui = block_add_block_ui($this->page, $output);
                  if ($addblockui) {
                      $contents[] = $addblockui;
                  }
              }
              $this->visibleblockcontent[$region] = $contents;
          }
      }
code: public function ensure_content_created($region, $output) {
          $this->ensure_instances_exist($region);
          if (!array_key_exists($region, $this->visibleblockcontent)) {
              $contents = array();
              if (array_key_exists($region, $this->extracontent)) {
                  $contents = $this->extracontent[$region];
              }
              $contents = array_merge($contents, $this->create_block_contents($this->blockinstances[$region], $output, $region));
              if (($region == $this->defaultregion) && (!isset($this->page->theme->addblockposition) ||
                      $this->page->theme->addblockposition == BLOCK_ADDBLOCK_POSITION_DEFAULT)) {
                  $addblockui = block_add_block_ui($this->page, $output);
                  if ($addblockui) {
                      $contents[] = $addblockui;
                  }
              }
              $this->visibleblockcontent[$region] = $contents;
          }
      }
code_tokens: public function ensure_content_created ( $ region , $ output ) { $ this -> ensure_instances_exist ( $ region ) ; if ( ! array_key_exists ( $ region , $ this -> visibleblockcontent ) ) { $ contents = array ( ) ; if ( array_key_exists ( $ region , $ this -> extracontent ) ) { $ contents = $ this -> extracontent [ $ region ] ; } $ contents = array_merge ( $ contents , $ this -> create_block_contents ( $ this -> blockinstances [ $ region ] , $ output , $ region ) ) ; if ( ( $ region == $ this -> defaultregion ) && ( ! isset ( $ this -> page -> theme -> addblockposition ) || $ this -> page -> theme -> addblockposition == BLOCK_ADDBLOCK_POSITION_DEFAULT ) ) { $ addblockui = block_add_block_ui ( $ this -> page , $ output ) ; if ( $ addblockui ) { $ contents [ ] = $ addblockui ; } } $ this -> visibleblockcontent [ $ region ] = $ contents ; } }
docstring: Ensure that there is some content within the given region
  
  @param string $region The name of the region to check
docstring_tokens: Ensure that there is some content within the given region