ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestExportPlugin Class Reference

Abstract parent class for all event hook plugin classes. More...

+ Inheritance diagram for ilTestExportPlugin:
+ Collaboration diagram for ilTestExportPlugin:

Public Member Functions

 getComponentType ()
 Get Component Type.
 getComponentName ()
 Get Component Name.
 getSlot ()
 Get Slot Name.
 getSlotId ()
 Get Slot ID.
 setTest ($test)
 setTimestmap ($timestmap)
 getTimestmap ()
 getFormat ()
 getFormatLabel ()
 This method should return a human readable label for your export.
- Public Member Functions inherited from ilPlugin
 __construct ()
 Constructor.
 getPluginName ()
 Get Plugin Name.
 getId ()
 Get Id.
 getLastUpdateVersion ()
 Get Version of last update.
 getVersion ()
 Get Current Version (from plugin.php file).
 getIliasMinVersion ()
 Get Required ILIAS min.
 getIliasMaxVersion ()
 Get Required ILIAS max.
 getActive ()
 Get Active.
 setDBVersion ($a_dbversion)
 Set DB Version.
 getDBVersion ()
 Get DB Version.
 writeDBVersion ($a_dbversion)
 Write DB version to database.
 getDirectory ()
 Get Plugin Directory.
 includeClass ($a_class_file_name)
 Include (once) a class file.
 getPrefix ()
 Get plugin prefix, used for lang vars.
 getTablePrefix ()
 Get db table plugin prefix.
 updateLanguages ()
 Update all languages.
 updateDatabase ()
 Update database.
 loadLanguageModule ()
 Load language module for plugin.
 txt ($a_var)
 Get Language Variable (prefix will be prepended automatically)
 getTemplate ($a_template, $a_par1=true, $a_par2=true)
 Get template from plugin.
 getImagePath ($a_img)
 Get image path.
 getStyleSheetLocation ($a_css_file)
 Get css file location.
 addBlockFile ($a_tpl, $a_var, $a_block, $a_tplname)
 Add template content to placeholder variable.
 isActive ()
 Check whether plugin is active.
 needsUpdate ()
 Check whether update is needed.
 activate ()
 Activate.
 deactivate ()
 Deactivate.
 update ()
 Update plugin.
 lookupNameForId ($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
 Lookup name for id.
 lookupIdForName ($a_ctype, $a_cname, $a_slot_id, $a_plugin_name)
 Lookup id for name.

Protected Member Functions

 slotInit ()
 Object initialization done by slot.
 getTest ()
 buildExportFile (ilTestExportFilename $export_path)
 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.
 getFormatIdentifier ()
 A unique identifier which describes your export type, e.g.
- Protected Member Functions inherited from ilPlugin
 setSlotObject ($a_slot)
 Set Plugin Slot.
 getSlotObject ()
 Get Plugin Slot.
 getClassesDirectory ()
 Get Plugin's classes Directory.
 getLanguageDirectory ()
 Get Plugin's language Directory.
 init ()
 Object initialization.
 beforeActivation ()
 Before activation processing.
 afterActivation ()
 After activation processing.
 afterDeactivation ()
 After deactivation processing.
 beforeUpdate ()
 Before update processing.
 afterUpdate ()
 After update processing.

Protected Attributes

 $test
 $timestmap = -1
- Protected Attributes inherited from ilPlugin
 $lang_initialised = false

Static Protected Attributes

static $reserved_formats

Additional Inherited Members

- Static Public Member Functions inherited from ilPlugin
static _getDirectory ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get plugin directory.
static getAvailableLangFiles ($a_lang_directory)
 Get array of all language files in the plugin.
static hasConfigureClass ($a_slot_dir, $a_name)
 Has the plugin a configure class?
static getConfigureClassName ($a_name)
 Get plugin configure class name.
static getDBUpdateScriptName ($a_ctype, $a_cname, $a_slot_name, $a_pname)
 Get DB update script filename (full path)
static lookupTxt ($a_mod_prefix, $a_pl_id, $a_lang_var)
 Lookup language text.
static _getImagePath ($a_ctype, $a_cname, $a_slot_id, $a_pname, $a_img)
 Get image path.
static createPluginRecord ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Create plugin record, if not existing.
static getPluginRecord ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get record from il_plugin table.
static getPluginObject ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get plugin object.
static lookupStoredData ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Lookup information data in il_plugin.
static getActivePluginsForSlot ($a_ctype, $a_cname, $a_slot_id)
 Get all active plugins for a slot.

Detailed Description

Abstract parent class for all event hook plugin classes.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 13 of file class.ilTestExportPlugin.php.

Member Function Documentation

ilTestExportPlugin::buildExportFile ( ilTestExportFilename  $export_path)
abstractprotected

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
ilException
Parameters
string$export_pathThe path to store the export file
ilTestExportPlugin::getComponentName ( )
final

Get Component Name.

Returns
string Component Name

Reimplemented from ilPlugin.

Definition at line 46 of file class.ilTestExportPlugin.php.

{
return "Test";
}
ilTestExportPlugin::getComponentType ( )
final

Get Component Type.

Returns
string Component Type

Reimplemented from ilPlugin.

Definition at line 37 of file class.ilTestExportPlugin.php.

References IL_COMP_MODULE.

{
}
ilTestExportPlugin::getFormat ( )
final
Returns
string
Exceptions
ilException

Definition at line 112 of file class.ilTestExportPlugin.php.

References getFormatIdentifier().

{
$format_id = $this->getFormatIdentifier();
if(!is_string($format_id))
{
throw new ilException('The format must be of type string.');
}
if(!strlen($format_id))
{
throw new ilException('The format is empty.');
}
if(strtolower($format_id) != $format_id)
{
throw new ilException('Please use a lowercase format.');
}
if(in_array($format_id, self::$reserved_formats))
{
throw new ilException('The format must not be one of: ' . implode(', ', self::$reserved_formats));
}
return $format_id;
}

+ Here is the call graph for this function:

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().

+ Here is the caller graph for this function:

ilTestExportPlugin::getFormatLabel ( )
abstract

This method should return a human readable label for your export.

Returns
string
ilTestExportPlugin::getSlot ( )
final

Get Slot Name.

Returns
string Slot Name

Reimplemented from ilPlugin.

Definition at line 55 of file class.ilTestExportPlugin.php.

{
return "Export";
}
ilTestExportPlugin::getSlotId ( )
final

Get Slot ID.

Returns
string Slot Id

Reimplemented from ilPlugin.

Definition at line 64 of file class.ilTestExportPlugin.php.

{
return "texp";
}
ilTestExportPlugin::getTest ( )
finalprotected
Returns
ilObjTest

Definition at line 87 of file class.ilTestExportPlugin.php.

References $test.

{
return $this->test;
}
ilTestExportPlugin::getTimestmap ( )
Returns
int

Definition at line 103 of file class.ilTestExportPlugin.php.

References $timestmap.

{
}
ilTestExportPlugin::setTest (   $test)
final
Parameters
ilObjTest$test

Definition at line 79 of file class.ilTestExportPlugin.php.

References $test.

{
$this->test = $test;
}
ilTestExportPlugin::setTimestmap (   $timestmap)
Parameters
int$timestmap

Definition at line 95 of file class.ilTestExportPlugin.php.

References $timestmap.

{
$this->timestmap = $timestmap;
}
ilTestExportPlugin::slotInit ( )
finalprotected

Object initialization done by slot.

Reimplemented from ilPlugin.

Definition at line 72 of file class.ilTestExportPlugin.php.

{
}

Field Documentation

ilTestExportPlugin::$reserved_formats
staticprotected
Initial value:
array(
'xml',
'csv'
)

Definition at line 28 of file class.ilTestExportPlugin.php.

ilTestExportPlugin::$test
protected

Definition at line 18 of file class.ilTestExportPlugin.php.

Referenced by getTest(), and setTest().

ilTestExportPlugin::$timestmap = -1
protected

Definition at line 23 of file class.ilTestExportPlugin.php.

Referenced by getTimestmap(), and setTimestmap().


The documentation for this class was generated from the following file: