You are here

function loft_data_grids_exporter in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 loft_data_grids.module \loft_data_grids_exporter()
  2. 7 loft_data_grids.module \loft_data_grids_exporter()

Instantiate a new ExportData object

This wrapper should be used for compatability issues with multiple library locations such as PHPExcel

Parameters

ExportDataInterface $data:

string $classname: The name of any of the various Exporter classes

string $filename: (Optional) Defaults to ''.

Return value

mixed

Related topics

1 call to loft_data_grids_exporter()
loft_data_grids_export_info in ./loft_data_grids.module
Return an array of exporters info

File

./loft_data_grids.module, line 229
Base module file for loft_data_grids

Code

function loft_data_grids_exporter(ExportDataInterface $data, $classname, $filename = '') {
  $classname = loft_data_grids_ns($classname);
  $object = FALSE;
  try {
    $object = new $classname($data, $filename);
  } catch (Exception $e) {
    watchdog_exception('loft_data_grids', $e);
  }
  return $object;
}