Skip to content

icms_ipf_export_Renderer

Raimondas Rimkevičius edited this page Mar 9, 2020 · 1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!

icms_ipf_export_Renderer

icms_ipf_export_Renderer class

Class that renders a set of data into a specific export format

  • Class name: icms_ipf_export_Renderer
  • Namespace:

Properties

$data

public array $data = array()

Contains the data to be exported

  • Visibility: public

$format

public string $format = csv

Format of the ouputed export. Currently only supports CSV

  • Visibility: public

$filename

public string $filename

Name of the file in which the exported data will be saved

  • Visibility: public

$filepath

public string $filepath

Path where the file will be saved

  • Visibility: public

$options

public array $options = array()

Options of the format to be exported in

  • Visibility: public

Methods

__construct

mixed icms_ipf_export_Renderer::__construct(array data, string filename, string filepath, string format, array options)

Constructor

  • Visibility: public

Arguments

  • data array - <p>Contains the data to be exported</p>
  • filename string - <p>Name of the file in which the exported data will be saved</p>
  • filepath string - <p>Path where the file will be saved</p>
  • format string - <p>Format of the ouputed export. Currently only supports CSV</p>
  • options array - <p>Options of the format to be exported in</p>

arrayToCsvString

mixed icms_ipf_export_Renderer::arrayToCsvString(\arr dataArray, \str separator, \str trim, bool removeEmptyLines)

Converts an array to a comma-separated string

  • Visibility: public

Arguments

  • dataArray arr
  • separator str
  • trim str
  • removeEmptyLines bool

valToCsvHelper

mixed icms_ipf_export_Renderer::valToCsvHelper(\str val, \str separator, \str trimFunction)
  • Visibility: public

Arguments

  • val str
  • separator str
  • trimFunction str

execute

mixed icms_ipf_export_Renderer::execute()
  • Visibility: public

saveExportFile

mixed icms_ipf_export_Renderer::saveExportFile(\str content)
  • Visibility: public

Arguments

  • content str

saveCsv

mixed icms_ipf_export_Renderer::saveCsv(\str content)
  • Visibility: public

Arguments

  • content str
Clone this wiki locally