Implementation of the Moodle filter API for the Multi-lang filter.  
 More...
 | 
|   | filter ($text, array $options=array()) | 
|   | Override this function to actually implement the filtering.  More...
  | 
|   | 
|   | hash () | 
|   | 
|   | setup ($page, $context) | 
|   | Setup page with filter requirements and other prepare stuff.  More...
  | 
|   | 
 | 
| 
context  | $context | 
|   | The context we are in. 
  | 
|   | 
| 
array  | $localconfig | 
|   | Any local configuration for this filter in this context. 
  | 
|   | 
Implementation of the Moodle filter API for the Multi-lang filter. 
- Copyright
 - Gaetan Frenoy gaeta.nosp@m.n@fr.nosp@m.enoy..nosp@m.net 
 
- 
2004 onwards Eloy Lafuente (stronk7)  
 
- License
 - http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
 
 
◆ filter()
      
        
          | filter_multilang::filter  | 
          ( | 
            | 
          $text,  | 
        
        
           | 
           | 
          array  | 
          $options = array()  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Override this function to actually implement the filtering. 
- Parameters
 - 
  
    | string | $text | some HTML content to process.  | 
    | array | $options | options passed to the filters  | 
  
   
- Return values
 - 
  
    | string | the HTML content after the filtering has been applied.  | 
  
   
Reimplemented from moodle_text_filter.
 
 
◆ get_parent_lang()
  
  
      
        
          | filter_multilang::get_parent_lang  | 
          ( | 
          string  | 
          $lang | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Puts some caching around get_parent_language(). 
Also handle parent == 'en' in a way that works better for us.
- Parameters
 - 
  
    | string | $lang | a Moodle language code, e.g. 'fr'.  | 
  
   
- Return values
 - 
  
    | string | the parent language.  | 
  
   
 
 
◆ process_match()
  
  
      
        
          | filter_multilang::process_match  | 
          ( | 
          array  | 
          $langblock | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
This is the callback used by the preg_replace_callback call above. 
- Parameters
 - 
  
    | array | $langblock | one of the matches from the regex match.  | 
  
   
- Return values
 - 
  
    | string | the replacement string (one of the possible translations).  | 
  
   
 
 
The documentation for this class was generated from the following file:
- filter/multilang/filter.php