ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
|
Class ilDataCollectionDatatype. More...
Public Member Functions | |
__construct ($a_id=0) | |
Constructor. More... | |
getId () | |
Get field id. More... | |
setTitle ($a_title) | |
Set title. More... | |
getTitle () | |
Get title. More... | |
setStorageLocation ($a_id) | |
Set Storage Location. More... | |
getStorageLocation () | |
Get Storage Location. More... | |
getDbType () | |
doRead () | |
Read Datatype. More... | |
parseValue ($value, ilDataCollectionRecordField $record_field) | |
Function to parse incoming data from form input value $value. More... | |
parseExportValue ($value) | |
Function to parse incoming data from form input value $value. More... | |
parseSortingValue ($value, ilDataCollectionRecordField $record_field, $link=true) | |
parseHTML ($value, ilDataCollectionRecordField $record_field, $link=true) | |
function parses stored value in database to a html output for eg. More... | |
parseFormInput ($value, ilDataCollectionRecordField $record_field) | |
function parses stored value to the variable needed to fill into the form for editing. More... | |
Static Public Member Functions | |
static | getAllDatatypes () |
Get all possible Datatypes. More... | |
static | getProperties ($a_id) |
Get all properties of a Datatype. More... | |
static | checkValidity ($type_id, $value) |
now only distinguishes between number and text values More... | |
static | getInputField (ilDataCollectionField $field) |
static | addFilterInputFieldToTable (ilDataCollectionField $field, ilTable2GUI &$table) |
addFilterInputFieldToTable This function adds the according filter item to the table gui passed as argument. More... | |
static | passThroughFilter (ilDataCollectionRecord $record, ilDataCollectionField $field, $filter) |
Data Fields | |
const | INPUTFORMAT_NONE = 0 |
const | INPUTFORMAT_NUMBER = 1 |
const | INPUTFORMAT_TEXT = 2 |
const | INPUTFORMAT_REFERENCE = 3 |
const | INPUTFORMAT_BOOLEAN = 4 |
const | INPUTFORMAT_DATETIME = 5 |
const | INPUTFORMAT_FILE = 6 |
const | INPUTFORMAT_RATING = 7 |
const | INPUTFORMAT_ILIAS_REF = 8 |
const | INPUTFORMAT_MOB = 9 |
const | INPUTFORMAT_REFERENCELIST = 10 |
const | INPUTFORMAT_FORMULA = 11 |
const | INPUTFORMAT_NON_EDITABLE_VALUE = 12 |
const | LINK_MAX_LENGTH = 40 |
Static Public Attributes | |
static | $mob_suffixes = array('jpg', 'jpeg', 'gif', 'png', 'mp3', 'flx', 'mp4', 'm4v', 'mov', 'wmv') |
Protected Member Functions | |
formatDate ($value, $format) | |
Protected Attributes | |
$id | |
$title | |
$storageLocation | |
$dbType | |
Private Member Functions | |
shortenLink ($value) | |
This method shortens a link. More... | |
Class ilDataCollectionDatatype.
Definition at line 32 of file class.ilDataCollectionDatatype.php.
ilDataCollectionDatatype::__construct | ( | $a_id = 0 | ) |
Constructor.
public
integer | datatype_id |
Definition at line 75 of file class.ilDataCollectionDatatype.php.
References doRead().
|
static |
addFilterInputFieldToTable This function adds the according filter item to the table gui passed as argument.
$field | ilDataCollectionField The field which should be filterable. |
&$table | ilTable2GUI The table you want the filter to be added to. |
Definition at line 307 of file class.ilDataCollectionDatatype.php.
References $lng, $options, ilTable2GUI\addFilterItemByMetaType(), ilTable2GUI\FILTER_DATE_RANGE, ilTable2GUI\FILTER_NUMBER_RANGE, ilTable2GUI\FILTER_SELECT, ilTable2GUI\FILTER_TEXT, ilDataCollectionField\getDatatypeId(), ilDataCollectionCache\getFieldCache(), ilDataCollectionField\getFieldRef(), ilDataCollectionField\getId(), ilDataCollectionCache\getTableCache(), ilDataCollectionField\getTitle(), INPUTFORMAT_BOOLEAN, INPUTFORMAT_DATETIME, INPUTFORMAT_FILE, INPUTFORMAT_ILIAS_REF, INPUTFORMAT_MOB, INPUTFORMAT_NUMBER, INPUTFORMAT_RATING, INPUTFORMAT_REFERENCE, INPUTFORMAT_REFERENCELIST, and INPUTFORMAT_TEXT.
Referenced by ilDataCollectionRecordListTableGUI\initFilter().
|
static |
now only distinguishes between number and text values
$type_id | int |
$value | mixed |
Definition at line 208 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionField\checkValidity().
ilDataCollectionDatatype::doRead | ( | ) |
Read Datatype.
Definition at line 144 of file class.ilDataCollectionDatatype.php.
References $ilDB, $query, getId(), setStorageLocation(), and setTitle().
Referenced by __construct().
|
protected |
$value | |
$format |
Definition at line 691 of file class.ilDataCollectionDatatype.php.
References $timestamp, ilCalendarSettings\DATE_FORMAT_DMY, ilCalendarSettings\DATE_FORMAT_MDY, and ilCalendarSettings\DATE_FORMAT_YMD.
Referenced by parseHTML().
|
static |
Get all possible Datatypes.
Definition at line 162 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionFieldEditGUI\getValues(), and ilDataCollectionFieldEditGUI\initForm().
ilDataCollectionDatatype::getDbType | ( | ) |
ilDataCollectionDatatype::getId | ( | ) |
Get field id.
Definition at line 88 of file class.ilDataCollectionDatatype.php.
References $id.
Referenced by doRead().
|
static |
ilDataCollectionField | $field |
Definition at line 232 of file class.ilDataCollectionDatatype.php.
References $lng, $title, ilDataCollectionField\getDatatypeId(), ilDataCollectionField\getDescription(), ilDataCollectionField\getId(), ilDataCollectionField\getLength(), ilDataCollectionField\getTextArea(), ilDataCollectionField\getTitle(), INPUTFORMAT_BOOLEAN, INPUTFORMAT_DATETIME, INPUTFORMAT_FILE, INPUTFORMAT_FORMULA, INPUTFORMAT_ILIAS_REF, INPUTFORMAT_MOB, INPUTFORMAT_NUMBER, INPUTFORMAT_RATING, INPUTFORMAT_REFERENCE, INPUTFORMAT_TEXT, ilDataCollectionField\isNRef(), ilDateTimeInputGUI\MODE_INPUT, ilFormPropertyGUI\setInfo(), ilDateTimeInputGUI\setMode(), ilFileInputGUI\setSuffixes(), ilTextInputGUI\setValue(), ilNonEditableValueGUI\setValue(), and ilMultiSelectInputGUI\setWidth().
Referenced by ilDataCollectionRecordEditGUI\initForm().
|
static |
Get all properties of a Datatype.
int | $a_id | datatype_id |
Definition at line 184 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionFieldEditGUI\getValues(), ilDataCollectionFieldEditGUI\initForm(), and ilDataCollectionFieldEditGUI\save().
ilDataCollectionDatatype::getStorageLocation | ( | ) |
Get Storage Location.
Definition at line 128 of file class.ilDataCollectionDatatype.php.
References $storageLocation.
ilDataCollectionDatatype::getTitle | ( | ) |
Get title.
Definition at line 108 of file class.ilDataCollectionDatatype.php.
References $title.
ilDataCollectionDatatype::parseExportValue | ( | $value | ) |
Function to parse incoming data from form input value $value.
returns the strin/number/etc. to store in the database.
$value |
Definition at line 611 of file class.ilDataCollectionDatatype.php.
References $file, ilObject2\_exists(), ilObject2\_lookupType(), INPUTFORMAT_BOOLEAN, INPUTFORMAT_DATETIME, INPUTFORMAT_FILE, and INPUTFORMAT_MOB.
ilDataCollectionDatatype::parseFormInput | ( | $value, | |
ilDataCollectionRecordField | $record_field | ||
) |
function parses stored value to the variable needed to fill into the form for editing.
$value |
Definition at line 882 of file class.ilDataCollectionDatatype.php.
References ilObject2\_exists(), ilObject2\_lookupType(), ilDataCollectionRecordField\getField(), and ilDataCollectionField\PROPERTYID_TEXTAREA.
ilDataCollectionDatatype::parseHTML | ( | $value, | |
ilDataCollectionRecordField | $record_field, | ||
$link = true |
|||
) |
function parses stored value in database to a html output for eg.
the record list gui.
$value | ||
ilDataCollectionRecordField | $record_field |
Definition at line 717 of file class.ilDataCollectionDatatype.php.
References $_GET, $ilCtrl, $ilUser, $lng, $preview, ilObject2\_exists(), ilObjMediaObject\_getDirectory(), ilObjMediaObject\_getURL(), ilObject2\_lookupType(), ilPreviewGUI\CONTEXT_REPOSITORY, ilPreview\createPreview(), formatDate(), ilDataCollectionRecordField\getField(), ilDataCollectionRecordField\getId(), ilDataCollectionRecordViewViewdefinition\getIdByTableId(), ilUtil\getImagePath(), ilDataCollectionRecordField\getRecord(), ilPreview\hasPreview(), ilUtil\img(), INPUTFORMAT_TEXT, ilPreview\lookupRenderStatus(), ilDataCollectionField\PROPERTYID_HEIGHT, ilDataCollectionField\PROPERTYID_LINK_DETAIL_PAGE_MOB, ilDataCollectionField\PROPERTYID_LINK_DETAIL_PAGE_TEXT, ilDataCollectionField\PROPERTYID_URL, ilDataCollectionField\PROPERTYID_WIDTH, ilPreview\RENDER_STATUS_NONE, ilMediaPlayerGUI\setFile(), and shortenLink().
ilDataCollectionDatatype::parseSortingValue | ( | $value, | |
ilDataCollectionRecordField | $record_field, | ||
$link = true |
|||
) |
$value | ||
ilDataCollectionRecordField | $record_field | |
bool | true | $link |
Definition at line 655 of file class.ilDataCollectionDatatype.php.
References ilObject2\_exists(), ilObject2\_lookupType(), ilDataCollectionRecordField\getField(), INPUTFORMAT_TEXT, and ilDataCollectionField\PROPERTYID_URL.
ilDataCollectionDatatype::parseValue | ( | $value, | |
ilDataCollectionRecordField | $record_field | ||
) |
Function to parse incoming data from form input value $value.
returns the string/number/etc. to store in the database.
$value | ||
ilDataCollectionRecordField | $record_field |
Definition at line 487 of file class.ilDataCollectionDatatype.php.
References $file, $location, $title, ilObjMediaObject\_determineWidthHeight(), ilObjMediaObject\_getDirectory(), ilObjMediaObject\_resizeImage(), ilObjMediaObject\_saveUsage(), ilFFmpeg\enabled(), ilFFmpeg\extractImage(), ilUtil\getASCIIFilename(), ilDataCollectionRecordField\getField(), ilMimeTypeUtil\getMimeType(), ilObjMediaObject\getMimeType(), ilDataCollectionRecordField\getRecord(), ilDataCollectionRecordField\getValue(), INPUTFORMAT_BOOLEAN, INPUTFORMAT_DATETIME, INPUTFORMAT_FILE, INPUTFORMAT_MOB, INPUTFORMAT_NUMBER, INPUTFORMAT_TEXT, ilUtil\moveUploadedFile(), ilDataCollectionField\PROPERTYID_HEIGHT, ilDataCollectionField\PROPERTYID_TEXTAREA, ilDataCollectionField\PROPERTYID_WIDTH, ilUtil\renameExecutables(), ilUtil\sendFailure(), and ilFFmpeg\supportsImageExtraction().
|
static |
ilDataCollectionRecord | $record | |
ilDataCollectionField | $field | |
$filter |
Definition at line 398 of file class.ilDataCollectionDatatype.php.
References $pass, ilObject2\_exists(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject2\_lookupType(), ilDataCollectionField\getDatatypeId(), ilDataCollectionField\getId(), ilDataCollectionField\getProperties(), ilDataCollectionRecord\getRecordFieldValue(), INPUTFORMAT_BOOLEAN, INPUTFORMAT_DATETIME, INPUTFORMAT_FILE, INPUTFORMAT_ILIAS_REF, INPUTFORMAT_MOB, INPUTFORMAT_NUMBER, INPUTFORMAT_RATING, INPUTFORMAT_REFERENCE, INPUTFORMAT_TEXT, and ilDataCollectionField\PROPERTYID_N_REFERENCE.
Referenced by ilDataCollectionRecord\passThroughFilter().
ilDataCollectionDatatype::setStorageLocation | ( | $a_id | ) |
Set Storage Location.
int | $a_id |
Definition at line 118 of file class.ilDataCollectionDatatype.php.
Referenced by doRead().
ilDataCollectionDatatype::setTitle | ( | $a_title | ) |
Set title.
string | $a_title |
Definition at line 98 of file class.ilDataCollectionDatatype.php.
Referenced by doRead().
|
private |
This method shortens a link.
The http(s):// and the www part are taken away. The rest will be shortened to sth similar to: "somelink.de/lange...gugus.html".
$value | The link in it's original form. |
Definition at line 852 of file class.ilDataCollectionDatatype.php.
Referenced by parseHTML().
|
protected |
Definition at line 64 of file class.ilDataCollectionDatatype.php.
Referenced by getDbType().
|
protected |
Definition at line 52 of file class.ilDataCollectionDatatype.php.
Referenced by getId().
|
static |
Definition at line 48 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionFieldEditGUI\initForm().
|
protected |
Definition at line 60 of file class.ilDataCollectionDatatype.php.
Referenced by getStorageLocation().
|
protected |
Definition at line 56 of file class.ilDataCollectionDatatype.php.
Referenced by getInputField(), getTitle(), and parseValue().
const ilDataCollectionDatatype::INPUTFORMAT_BOOLEAN = 4 |
Definition at line 38 of file class.ilDataCollectionDatatype.php.
Referenced by addFilterInputFieldToTable(), ilDataCollectionTable\getFields(), getInputField(), ilDataCollectionTable\getPartialRecords(), ilDataCollectionFieldEditGUI\initForm(), parseExportValue(), parseValue(), and passThroughFilter().
const ilDataCollectionDatatype::INPUTFORMAT_DATETIME = 5 |
Definition at line 39 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionStandardField\_getStandardFieldsAsArray(), addFilterInputFieldToTable(), ilDataCollectionField\checkValidity(), ilDataCollectionNReferenceField\getHTML(), getInputField(), ilDataCollectionTable\getPartialRecords(), ilDataCollectionRecordListGUI\importRecords(), ilDataCollectionRecordEditGUI\initForm(), parseExportValue(), parseValue(), and passThroughFilter().
const ilDataCollectionDatatype::INPUTFORMAT_FILE = 6 |
Definition at line 40 of file class.ilDataCollectionDatatype.php.
Referenced by addFilterInputFieldToTable(), ilDataCollectionRecord\doDelete(), ilDataCollectionFieldListTableGUI\fillRow(), ilDataCollectionTable\getFields(), getInputField(), ilDataCollectionTable\getPartialRecords(), ilDataCollectionExporter\getXmlExportHeadDependencies(), ilDataCollectionDataSet\getXmlNamespace(), ilDataCollectionRecordEditGUI\initForm(), parseExportValue(), parseValue(), passThroughFilter(), ilDataCollectionRecordEditGUI\save(), and ilDataCollectionRecordField\setValue().
const ilDataCollectionDatatype::INPUTFORMAT_FORMULA = 11 |
Definition at line 45 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionTable\getFields(), getInputField(), ilDataCollectionCache\getInstance(), and ilDataCollectionTable\getPartialRecords().
const ilDataCollectionDatatype::INPUTFORMAT_ILIAS_REF = 8 |
Definition at line 42 of file class.ilDataCollectionDatatype.php.
Referenced by addFilterInputFieldToTable(), ilDataCollectionRecordViewViewdefinition\getAvailablePlaceholders(), ilDataCollectionTable\getFields(), getInputField(), ilDataCollectionCache\getInstance(), ilDataCollectionTable\getPartialRecords(), ilDataCollectionDataSet\getXmlNamespace(), and passThroughFilter().
const ilDataCollectionDatatype::INPUTFORMAT_MOB = 9 |
Definition at line 43 of file class.ilDataCollectionDatatype.php.
Referenced by addFilterInputFieldToTable(), ilDataCollectionRecord\doDelete(), ilDataCollectionFieldListTableGUI\fillRow(), ilDataCollectionTable\getFields(), getInputField(), ilDataCollectionTable\getPartialRecords(), ilDataCollectionExporter\getXmlExportHeadDependencies(), ilDataCollectionDataSet\getXmlNamespace(), ilDataCollectionRecordEditGUI\initForm(), parseExportValue(), parseValue(), passThroughFilter(), and ilDataCollectionRecordEditGUI\save().
const ilDataCollectionDatatype::INPUTFORMAT_NON_EDITABLE_VALUE = 12 |
Definition at line 46 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionFieldEditGUI\initForm().
const ilDataCollectionDatatype::INPUTFORMAT_NONE = 0 |
Definition at line 34 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionStandardField\_getStandardFieldsAsArray().
const ilDataCollectionDatatype::INPUTFORMAT_NUMBER = 1 |
Definition at line 35 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionStandardField\_getStandardFieldsAsArray(), addFilterInputFieldToTable(), ilDataCollectionRecordListTableGUI\fillRowExcel(), ilDataCollectionNReferenceField\getHTML(), getInputField(), ilDataCollectionTable\getPartialRecords(), ilDataCollectionFieldEditGUI\initForm(), parseValue(), and passThroughFilter().
const ilDataCollectionDatatype::INPUTFORMAT_RATING = 7 |
Definition at line 41 of file class.ilDataCollectionDatatype.php.
Referenced by addFilterInputFieldToTable(), ilDataCollectionTable\getFields(), getInputField(), ilDataCollectionCache\getInstance(), ilDataCollectionTable\getPartialRecords(), ilDataCollectionRecordField\loadValue(), and passThroughFilter().
const ilDataCollectionDatatype::INPUTFORMAT_REFERENCE = 3 |
Definition at line 37 of file class.ilDataCollectionDatatype.php.
Referenced by addFilterInputFieldToTable(), ilDataCollectionField\cloneProperties(), ilObjDataCollection\cloneStructure(), ilDataCollectionFieldListTableGUI\fillRow(), ilDataCollectionRecordViewViewdefinition\getAvailablePlaceholders(), ilDataCollectionTable\getFields(), getInputField(), ilDataCollectionCache\getInstance(), ilDataCollectionTable\getPartialRecords(), ilDataCollectionDataSet\getXmlNamespace(), ilDataCollectionRecordListGUI\importRecords(), ilDataCollectionFieldEditGUI\initForm(), ilDataCollectionRecordEditGUI\initForm(), and passThroughFilter().
const ilDataCollectionDatatype::INPUTFORMAT_REFERENCELIST = 10 |
Definition at line 44 of file class.ilDataCollectionDatatype.php.
Referenced by addFilterInputFieldToTable(), ilDataCollectionTable\getFields(), and ilDataCollectionFieldEditGUI\initForm().
const ilDataCollectionDatatype::INPUTFORMAT_TEXT = 2 |
Definition at line 36 of file class.ilDataCollectionDatatype.php.
Referenced by ilDataCollectionStandardField\_getStandardFieldsAsArray(), addFilterInputFieldToTable(), ilDataCollectionFieldEditGUI\checkInput(), ilDataCollectionField\checkValidity(), getInputField(), ilDataCollectionTable\getPartialRecords(), parseHTML(), parseSortingValue(), parseValue(), and passThroughFilter().
const ilDataCollectionDatatype::LINK_MAX_LENGTH = 40 |
Definition at line 47 of file class.ilDataCollectionDatatype.php.