19 declare(strict_types=1);
73 if (!is_string($format_id)) {
74 throw new ilException(
'The format must be of type string.');
77 if (!strlen($format_id)) {
81 if (strtolower($format_id) != $format_id) {
82 throw new ilException(
'Please use a lowercase format.');
85 if (in_array($format_id, self::$reserved_formats)) {
86 throw new ilException(
'The format must not be one of: ' . implode(
', ', self::$reserved_formats));
95 final public function deliver():
void 99 $main_tpl = $DIC[
'tpl'];
106 $this->file_delivery->legacyDelivery()->attached(
115 final public function write(): ?string
123 throw new ilException(
'Incomplete object configuration. Please pass an instance of ilObjTest before calling the export!');
129 return $export_filename->getPathname();
131 if ($this->
txt($e->getMessage()) ==
'-' . $e->getMessage() .
'-') {
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
createExportFile(ilGlobalTemplateInterface $main_tpl)
setTimestmap(int $timestmap)
Abstract parent class for all test export plugin classes.
Writeable part of repository interface to ilComponentDataDB.
getFormatLabel()
This method should return a human readable label for your export.
__construct(\ilDBInterface $db, \ilComponentRepositoryWrite $component_repository, string $id)
getFormatIdentifier()
A unique identifier which describes your export type, e.g.
ilComponentRepositoryWrite $component_repository
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
txt(string $a_var)
Get Language Variable (prefix will be prepended automatically)
buildExportFile(ExportFilename $export_path)
This method is called if the user wants to export a test of YOUR export type If you throw an exceptio...
__construct(Container $dic, ilPlugin $plugin)