Abstract parent class for all test export plugin classes.
More...
|
| | __construct (\ilDBInterface $db, \ilComponentRepositoryWrite $component_repository, string $id) |
| |
| | setTest (ilObjTest $test) |
| |
| | setTimestmap (int $timestmap) |
| |
| | getTimestmap () |
| |
| | getFormat () |
| |
| | getFormatLabel () |
| | This method should return a human readable label for your export. More...
|
| |
| | getMessage () |
| |
| | __construct (\ilDBInterface $db, \ilComponentRepositoryWrite $component_repository, string $id) |
| |
| | getPluginName () |
| |
| | getId () |
| |
| | getVersion () |
| | Only very little classes seem to care about this: More...
|
| |
| | getDirectory () |
| | Only very little classes seem to care about this: More...
|
| |
| | isActive () |
| | Only very little classes seem to care about this: More...
|
| |
| | needsUpdate () |
| |
| | install () |
| |
| | uninstall () |
| |
| | activate () |
| | This will update (if required) and activate the plugin. More...
|
| |
| | deactivate () |
| |
| | update () |
| |
| | loadLanguageModule () |
| | Load language module for plugin. More...
|
| |
| | txt (string $a_var) |
| | Get Language Variable (prefix will be prepended automatically) More...
|
| |
| | getTemplate (string $a_template, bool $a_par1=true, bool $a_par2=true) |
| | @deprecate ILIAS is moving towards UI components and plugins are expected to use these components. More...
|
| |
| | getStyleSheetLocation (string $a_css_file) |
| | @deprecate ILIAS is moving towards UI components and plugins are expected to use these components. More...
|
| |
| | addBlockFile ($a_tpl, $a_var, $a_block, $a_tplname) |
| | @deprecate ILIAS is moving towards UI components and plugins are expected to use these components. More...
|
| |
| | getGlobalScreenProviderCollection () |
| |
| | exchangeUIRendererAfterInitialization (\ILIAS\DI\Container $dic) |
| | This methods allows to replace the UI Renderer (see src/UI) of ILIAS after initialization by returning a closure returning a custom renderer. More...
|
| |
| | exchangeUIFactoryAfterInitialization (string $dic_key, \ILIAS\DI\Container $dic) |
| | This methods allows to replace some factory for UI Components (see src/UI) of ILIAS after initialization by returning a closure returning a custom factory. More...
|
| |
| | deliver () |
| |
| | write () |
| |
Abstract parent class for all test export plugin classes.
- Author
- Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Definition at line 28 of file class.ilTestExportPlugin.php.
◆ __construct()
◆ buildExportFile()
This method is called if the user wants to export a test of YOUR export type If you throw an exception of type ilException with a respective language variable, ILIAS presents a translated failure message.
- Exceptions
-
- Parameters
-
| ExportFilename | $export_path | The path to store the export file |
Referenced by createExportFile().
◆ createExportFile()
Definition at line 124 of file class.ilTestExportPlugin.php.
124 : ?string
125 {
126 if ($this->
getTest() ===
null) {
127 throw new ilException(
'Incomplete object configuration. Please pass an instance of ilObjTest before calling the export!');
128 }
129
130 try {
133 return $export_filename->getPathname();
135 if ($this->
txt($e->getMessage()) ==
'-' .
$e->getMessage() .
'-') {
137 } else {
139 }
140 return null;
141 }
142 }
Base class for ILIAS Exception handling.
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...
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
References Vendor\Package\$e, buildExportFile(), ilPlugin\getId(), getTest(), ILIAS\UICore\GlobalTemplate\setOnScreenMessage(), and ilPlugin\txt().
◆ getFormat()
| ilTestExportPlugin::getFormat |
( |
| ) |
|
|
final |
- Exceptions
-
Definition at line 69 of file class.ilTestExportPlugin.php.
69 : string
70 {
72
73 if (!is_string($format_id)) {
74 throw new ilException(
'The format must be of type string.');
75 }
76
77 if (!strlen($format_id)) {
79 }
80
81 if (strtolower($format_id) != $format_id) {
82 throw new ilException(
'Please use a lowercase format.');
83 }
84
85 if (in_array($format_id, self::$reserved_formats)) {
86 throw new ilException(
'The format must not be one of: ' . implode(
', ', self::$reserved_formats));
87 }
88
89 return $format_id;
90 }
getFormatIdentifier()
A unique identifier which describes your export type, e.g.
References getFormatIdentifier().
◆ getFormatIdentifier()
| ilTestExportPlugin::getFormatIdentifier |
( |
| ) |
|
|
abstractprotected |
A unique identifier which describes your export type, e.g.
imsm There is currently no mapping implemented concerning the filename. Feel free to create csv, xml, zip files ....
- Returns
- string
Referenced by getFormat().
◆ getFormatLabel()
| ilTestExportPlugin::getFormatLabel |
( |
| ) |
|
|
abstract |
This method should return a human readable label for your export.
- Returns
- string
◆ getTest()
| ilTestExportPlugin::getTest |
( |
| ) |
|
|
finalprotected |
◆ getTimestmap()
| ilTestExportPlugin::getTimestmap |
( |
| ) |
|
◆ setTest()
| ilTestExportPlugin::setTest |
( |
ilObjTest |
$test | ) |
|
|
final |
◆ setTimestmap()
| ilTestExportPlugin::setTimestmap |
( |
int |
$timestmap | ) |
|
◆ $reserved_formats
| ilTestExportPlugin::$reserved_formats |
|
staticprotected |
◆ $test
◆ $timestmap
| int ilTestExportPlugin::$timestmap = -1 |
|
protected |
The documentation for this class was generated from the following file: