Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
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.
 
 add_data ($row)
 Add a row of data.
 
 add_seperator ()
 
 document_started ()
 
 finish_document ()
 Finish download.
 
 finish_table ()
 Finish export.
 
 format_data (array $row)
 Format a row of data, removing HTML tags and entities from each of the cells.
 
 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.
 
 output_headers ($headers)
 Output headers.
 
 set_table (&$table)
 
 start_document ($filename, $sheettitle)
 Start document.
 
 start_table ($sheettitle)
 Start export.
 
 supports_html ()
 Whether the current dataformat supports export of HTML.
 
 table_default_export_format_parent (&$table)
 Old syntax of class constructor.
 

Public Attributes

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

Protected Attributes

array $columns
 $columns
 
core dataformat base $dataformat
 $dataformat
 
int $rownum = 0
 $rownum
 

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_data()

table_default_export_format_parent::format_data ( array $row)
inherited

Format a row of data, removing HTML tags and entities from each of the cells.

Parameters
array$row
Return values
array

◆ 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

◆ supports_html()

table_dataformat_export_format::supports_html ( )

Whether the current dataformat supports export of HTML.

Return values
bool

◆ 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: