Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | Protected Attributes | List of all members
table_dataformat_export_format Class Reference

Dataformat exporter. More...

Inheritance diagram for table_dataformat_export_format:
table_default_export_format_parent

Public Member Functions

 __construct (&$table, $dataformat)
 Constructor. More...
 
 add_data ($row)
 Add a row of data. More...
 
 add_seperator ()
 
 document_started ()
 
 finish_document ()
 Finish download.
 
 finish_table ()
 Finish export.
 
 format_text ($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL)
 Given text in a variety of format codings, this function returns the text as safe HTML or as plain text dependent on what is appropriate for the download format. More...
 
 output_headers ($headers)
 Output headers. More...
 
 set_table (&$table)
 
 start_document ($filename, $sheettitle)
 Start document. More...
 
 start_table ($sheettitle)
 Start export. More...
 
 table_default_export_format_parent (&$table)
 Old syntax of class constructor. More...
 

Public Attributes

bool $documentstarted = false
 output started. More...
 
flexible_table $table
 or child class reference pointing to table class object from which to export data.
 

Protected Attributes

$columns $columns
 
$dataformat $dataformat
 
$rownum $rownum = 0
 

Detailed Description

Dataformat exporter.

@subpackage tablelib

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

table_dataformat_export_format::__construct ( $table,
  $dataformat 
)

Constructor.

Parameters
string$tableAn sql table
string$dataformattype of dataformat for export

Member Function Documentation

◆ add_data()

table_dataformat_export_format::add_data (   $row)

Add a row of data.

Parameters
array$rowOne record of data

Reimplemented from table_default_export_format_parent.

◆ format_text()

table_default_export_format_parent::format_text (   $text,
  $format = FORMAT_MOODLE,
  $options = NULL,
  $courseid = NULL 
)
inherited

Given text in a variety of format codings, this function returns the text as safe HTML or as plain text dependent on what is appropriate for the download format.

The default removes all tags.

◆ output_headers()

table_dataformat_export_format::output_headers (   $headers)

Output headers.

Parameters
array$headers

◆ start_document()

table_dataformat_export_format::start_document (   $filename,
  $sheettitle 
)

Start document.

Parameters
string$filename
string$sheettitle

◆ start_table()

table_dataformat_export_format::start_table (   $sheettitle)

Start export.

Parameters
string$sheettitleoptional spreadsheet worksheet title

◆ table_default_export_format_parent()

table_default_export_format_parent::table_default_export_format_parent ( $table)
inherited

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated:
since Moodle 3.1

Member Data Documentation

◆ $documentstarted

bool table_default_export_format_parent::$documentstarted = false
inherited

output started.

Keeps track of whether any output has been started yet.


The documentation for this class was generated from the following file: