public function onAfterBuildRowsCSV(array $records, mixed $handler) : array

Fires after completing the body of the CSV table.


Description

Trigger hook to allow the plugins to append additional rows at the end of the CSV file.


Parameters

$records

(array)  An array of database records.

$handler

(VAPOrderExportDriverCsv)  The instance used to export the records.

Return Value

Array. The rows to include at the end of the CSV body. Must be an array of arrays.


Example

/**
 * Trigger event to allow the plugins to append additional rows
 * within the CSV file.
 *
 * @param   array  $records  An array of database records.
 * @param   mixed  $handler  The current handler instance.
 *
 * @return  array  The rows to include. Must be an array of arrays.
 */
public function onAfterBuildRowsCSV($records, $handler)
{
    /**
     * @todo it is possible to append some new rows here
     */

    return array();
}

Changelog

VersionDescription
1.7 Introduced.
Last Update: 2021-10-08 10:07
Helpful?
See Also: