PHP Class Craft\AmForms_ExportsService

Inheritance: extends craft\BaseApplicationComponent
Afficher le fichier Open project: am-impact/amforms

Méthodes publiques

Méthode Description
__construct ( )
deleteExportById ( integer $id ) : boolean Delete an export.
deleteExportFilesForForm ( AmForms_FormModel $form ) : boolean Delete export files for a form.
deleteTempExportFiles ( ) : boolean Delete temporarily created export files.
getAllExports ( ) : array | null Get all exports.
getExportById ( integer $id ) : craft\AmForms_ExportModel | null Get an export by its ID.
getExportFields ( AmForms_FormModel $form ) : array Get export fields for a form.
getTempExportFiles ( array $exports = [] ) : boolean | array Get temporarily created export files.
restartExport ( craft\AmForms_ExportModel $export ) Restart an export.
runExport ( craft\AmForms_ExportModel $export, integer $limit = null, integer $offset = null ) : boolean Run an export.
saveExport ( craft\AmForms_ExportModel $export ) : boolean Save an export.
saveTotalByCriteria ( craft\AmForms_ExportModel $export ) Save total submissions that meet the saved criteria.

Private Methods

Méthode Description
_addExportCriteria ( craft\AmForms_ExportModel $export, &$criteria ) : boolean Add export criteria.
_createExportFile ( craft\AmForms_ExportModel $export, AmForms_FormModel $form ) : string Create an export file.
_exportSubmission ( craft\AmForms_ExportModel $export, mixed $submission, boolean $returnData = false ) Export submission.
_exportSubmissionToZip ( craft\AmForms_ExportModel $export, craft\AmForms_SubmissionModel $submission ) Export a submission to the export's zip file.
_getExportColumns ( craft\AmForms_ExportModel $export, AmForms_FormModel $form ) : array Get export columns.
_getExportPath ( ) : string Get export path.

Method Details

__construct() public méthode

public __construct ( )

deleteExportById() public méthode

Delete an export.
public deleteExportById ( integer $id ) : boolean
$id integer
Résultat boolean

deleteExportFilesForForm() public méthode

Delete export files for a form.
public deleteExportFilesForForm ( AmForms_FormModel $form ) : boolean
$form AmForms_FormModel
Résultat boolean

deleteTempExportFiles() public méthode

Delete temporarily created export files.
public deleteTempExportFiles ( ) : boolean
Résultat boolean

getAllExports() public méthode

Get all exports.
public getAllExports ( ) : array | null
Résultat array | null

getExportById() public méthode

Get an export by its ID.
public getExportById ( integer $id ) : craft\AmForms_ExportModel | null
$id integer
Résultat craft\AmForms_ExportModel | null

getExportFields() public méthode

Get export fields for a form.
public getExportFields ( AmForms_FormModel $form ) : array
$form AmForms_FormModel
Résultat array

getTempExportFiles() public méthode

Note: these files were created by single submission export.
public getTempExportFiles ( array $exports = [] ) : boolean | array
$exports array Array with AmForms_ExportModel to be able to skip files.
Résultat boolean | array

restartExport() public méthode

Restart an export.
public restartExport ( craft\AmForms_ExportModel $export )
$export craft\AmForms_ExportModel

runExport() public méthode

Run an export.
public runExport ( craft\AmForms_ExportModel $export, integer $limit = null, integer $offset = null ) : boolean
$export craft\AmForms_ExportModel
$limit integer
$offset integer
Résultat boolean

saveExport() public méthode

Save an export.
public saveExport ( craft\AmForms_ExportModel $export ) : boolean
$export craft\AmForms_ExportModel
Résultat boolean

saveTotalByCriteria() public méthode

Save total submissions that meet the saved criteria.
public saveTotalByCriteria ( craft\AmForms_ExportModel $export )
$export craft\AmForms_ExportModel