original_string: public function apply_theme_region_manipulations($region) {
          if ($this->blockmanipulations && isset($this->blockmanipulations[$region])) {
              $regionwas = $region;
              $regionnow = $this->blockmanipulations[$region];
              if ($this->blocks->is_known_region($regionwas) && $this->blocks->is_known_region($regionnow)) {
                  // Both the before and after regions are known so we can swap them over.
                  return $regionnow;
              }
              // We didn't know about both, we won't swap them over.
              return $regionwas;
          }
          return $region;
      }
code: public function apply_theme_region_manipulations($region) {
          if ($this->blockmanipulations && isset($this->blockmanipulations[$region])) {
              $regionwas = $region;
              $regionnow = $this->blockmanipulations[$region];
              if ($this->blocks->is_known_region($regionwas) && $this->blocks->is_known_region($regionnow)) {
                  // Both the before and after regions are known so we can swap them over.
                  return $regionnow;
              }
              // We didn't know about both, we won't swap them over.
              return $regionwas;
          }
          return $region;
      }
code_tokens: public function apply_theme_region_manipulations ( $ region ) { if ( $ this -> blockmanipulations && isset ( $ this -> blockmanipulations [ $ region ] ) ) { $ regionwas = $ region ; $ regionnow = $ this -> blockmanipulations [ $ region ] ; if ( $ this -> blocks -> is_known_region ( $ regionwas ) && $ this -> blocks -> is_known_region ( $ regionnow ) ) { // Both the before and after regions are known so we can swap them over. return $ regionnow ; } // We didn't know about both, we won't swap them over. return $ regionwas ; } return $ region ; }
docstring: Returns the block region having made any required theme manipulations.
  
  @since Moodle 2.5.1 2.6
  @param string $region
  @return string
docstring_tokens: Returns the block region having made any required theme manipulations .