JSON data format writer.  
 More...
|  | 
| $extension | $extension = ".json" | 
|  | 
| $mimetype | $mimetype = "application/json" | 
|  | 
| $sheetdatadded | $sheetdatadded = false | 
|  | 
| $sheetstarted | $sheetstarted = false | 
|  | 
|  | 
| string[] | $columns = [] | 
|  | $columns 
 | 
|  | 
| $filename | $filename = '' | 
|  | 
| string | $filepath = '' | 
|  | The location to store the output content. 
 | 
|  | 
◆ close_output()
      
        
          | dataformat_json\writer::close_output | ( |  | ) |  | 
      
 
 
◆ close_output_to_file()
  
  | 
        
          | core\dataformat\base::close_output_to_file | ( |  | ) |  |  | inherited | 
 
 
◆ close_sheet()
      
        
          | dataformat_json\writer::close_sheet | ( |  | $columns | ) |  | 
      
 
 
◆ export_html_image_source()
  
  | 
        
          | core\dataformat\base::export_html_image_source | ( | \stored_file | $file | ) |  |  | protectedinherited | 
 
Given a stored_file, return a suitable source attribute for an img element in the export (or null to use the original) 
- Parameters
- 
  
  
- Return values
- 
  
  
Reimplemented in dataformat_pdf\writer.
 
 
◆ format_record()
  
  | 
        
          | core\dataformat\base::format_record | ( |  | $record | ) |  |  | protectedinherited | 
 
Apply formatting to the cells of a given record. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ get_extension()
  
  | 
        
          | core\dataformat\base::get_extension | ( |  | ) |  |  | inherited | 
 
Get the file extension. 
- Return values
- 
  
  
 
 
◆ replace_pluginfile_images()
  
  | 
        
          | core\dataformat\base::replace_pluginfile_images | ( | ?string | $content | ) |  |  | protectedinherited | 
 
We need to locate all img tags within a given cell that match pluginfile URL's. 
Partly so the exported file will show the image without requiring the user is logged in; and also to prevent some of the dataformats requesting the file themselves, which is likely to fail due to them not having an active session
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ send_http_headers()
  
  | 
        
          | core\dataformat\base::send_http_headers | ( |  | ) |  |  | inherited | 
 
 
◆ set_filename()
  
  | 
        
          | core\dataformat\base::set_filename | ( |  | $filename | ) |  |  | inherited | 
 
Set download filename base. 
- Parameters
- 
  
  
 
 
◆ set_filepath()
  
  | 
        
          | core\dataformat\base::set_filepath | ( | string | $filepath | ) |  |  | inherited | 
 
Set file path when writing to file. 
- Parameters
- 
  
  
- Exceptions
- 
  
  
 
 
◆ set_sheettitle()
  
  | 
        
          | core\dataformat\base::set_sheettitle | ( |  | $title | ) |  |  | inherited | 
 
 
◆ start_output()
      
        
          | dataformat_json\writer::start_output | ( |  | ) |  | 
      
 
 
◆ start_output_to_file()
  
  | 
        
          | core\dataformat\base::start_output_to_file | ( |  | ) |  |  | inherited | 
 
 
◆ start_sheet()
      
        
          | dataformat_json\writer::start_sheet | ( |  | $columns | ) |  | 
      
 
Write the start of the sheet we will be adding data to. 
- Parameters
- 
  
  
Reimplemented from core\dataformat\base.
 
 
◆ supports_html()
  
  | 
        
          | core\dataformat\base::supports_html | ( |  | ) |  |  | inherited | 
 
 
◆ write_record()
      
        
          | dataformat_json\writer::write_record | ( |  | $record, | 
        
          |  |  |  | $rownum ) | 
      
 
 
The documentation for this class was generated from the following file: