PHP Class FOF30\View\DataView\Csv

Inheritance: extends Html, implements FOF30\View\DataView\DataViewInterface
Show file Open project: akeeba/fof

Protected Properties

Property Type Description
$csvFields array The columns to include in the CSV output. If it's empty it will be ignored.
$csvFilename string The filename of the downloaded CSV file.
$csvHeader boolean Should I produce a CSV header row.

Public Methods

Method Description
__construct ( Container $container, array $config = [] ) Public constructor. Instantiates a F0FViewCsv object.
display ( string $tpl = null ) : boolean Overrides the default method to execute and display a template script.

Method Details

__construct() public method

Public constructor. Instantiates a F0FViewCsv object.
public __construct ( Container $container, array $config = [] )
$container FOF30\Container\Container The container we belong to
$config array The configuration overrides for the view

display() public method

Instead of loadTemplate is uses loadAnyTemplate.
public display ( string $tpl = null ) : boolean
$tpl string The name of the template file to parse
return boolean True on success

Property Details

$csvFields protected property

The columns to include in the CSV output. If it's empty it will be ignored.
protected array $csvFields
return array

$csvFilename protected property

The filename of the downloaded CSV file.
protected string $csvFilename
return string

$csvHeader protected property

Should I produce a CSV header row.
protected bool $csvHeader
return boolean