<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lekoala / silverstripe-excel-import-export example snippets
public function import($data, $form, $request)
{
if (!ExcelImportExport::checkImportForm($this)) {
return false;
}
$handler = $data['ImportHandler'] ?? null;
if ($handler == "default") {
return parent::import($data, $form, $request);
}
return ExcelImportExport::useCustomHandler($handler, $form, $this);
}
public static function getImportDescription()
{
return "This is my custom description";
}
public static function getSampleFileLink()
{
return ExcelImportExport::createDownloadSampleLink(__CLASS__);
}
public static function getSampleFile()
{
$data = []; // TODO
ExcelImportExport::createSampleFile($data, __CLASS__);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.