ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilDataCollectionDatatype Class Reference

Class ilDataCollectionDatatype. More...

+ Collaboration diagram for ilDataCollectionDatatype:

Public Member Functions

 __construct ($a_id=0)
 Constructor public.
 getId ()
 Get field id.
 setTitle ($a_title)
 Set title.
 getTitle ()
 Get title.
 setStorageLocation ($a_id)
 Set Storage Location.
 getStorageLocation ()
 Get Storage Location.
 getDbType ()
 doRead ()
 Read Datatype.
 getProperties ($a_id)
 Get all properties of a Datatype.
 parseValue ($value, ilDataCollectionRecordField $record_field)
 Function to parse incoming data from form input value $value.
 parseExportValue ($value)
 Function to parse incoming data from form input value $value.
 parseHTML ($value, ilDataCollectionRecordField $record_field)
 function parses stored value in database to a html output for eg.
 parseFormInput ($value, ilDataCollectionRecordField $record_field)
 function parses stored value to the variable needed to fill into the form for editing.

Static Public Member Functions

static getAllDatatypes ()
 Get all possible Datatypes.
static checkValidity ($type_id, $value)
 now only distinguishes between number and text values
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.
static passThroughFilter (ilDataCollectionRecord $record, ilDataCollectionField $field, $filter)

Data Fields

const INPUTFORMAT_TEXT = 2
const INPUTFORMAT_NUMBER = 1
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 LINK_MAX_LENGTH = 30

Protected Attributes

 $id
 $title
 $storageLocation
 $dbType

Detailed Description

Constructor & Destructor Documentation

ilDataCollectionDatatype::__construct (   $a_id = 0)

Constructor public.

Parameters
integerdatatype_id

Definition at line 61 of file class.ilDataCollectionDatatype.php.

References doRead().

{
if ($a_id != 0)
{
$this->id = $a_id;
$this->doRead();
}
}

+ Here is the call graph for this function:

Member Function Documentation

static ilDataCollectionDatatype::addFilterInputFieldToTable ( ilDataCollectionField  $field,
ilTable2GUI $table 
)
static

addFilterInputFieldToTable This function adds the according filter item to the table gui passed as argument.

Parameters
$fieldilDataCollectionField The field which should be filterable.
&$tableilTable2GUI The table you want the filter to be added to.

Definition at line 276 of file class.ilDataCollectionDatatype.php.

References $lng, 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, and INPUTFORMAT_TEXT.

Referenced by ilDataCollectionRecordListTableGUI\initFilter().

{
global $lng;
$type_id = $field->getDatatypeId();
$input = NULL;
switch($type_id)
{
$input = $table->addFilterItemByMetaType("filter_".$field->getId(), ilTable2GUI::FILTER_TEXT, false, $field->getId());
$input->setSubmitFormOnEnter(true);
break;
$input = $table->addFilterItemByMetaType("filter_".$field->getId(), ilTable2GUI::FILTER_NUMBER_RANGE, false, $field->getId());
$input->setSubmitFormOnEnter(true);
break;
$input = $table->addFilterItemByMetaType("filter_".$field->getId(), ilTable2GUI::FILTER_SELECT, false, $field->getId());
$input->setOptions(array("" => $lng->txt("dcl_any"), "not_checked" => $lng->txt("dcl_not_checked"), "checked" => $lng->txt("dcl_checked")));
break;
$input = $table->addFilterItemByMetaType("filter_".$field->getId(), ilTable2GUI::FILTER_DATE_RANGE, false, $field->getId());
$input->setSubmitFormOnEnter(true);
$input->setStartYear(date("Y")-100);
break;
$input = $table->addFilterItemByMetaType("filter_".$field->getId(), ilTable2GUI::FILTER_TEXT, false, $field->getId());
$input->setSubmitFormOnEnter(true);
break;
$input = $table->addFilterItemByMetaType("filter_".$field->getId(), ilTable2GUI::FILTER_SELECT, false, $field->getId());
$ref_field_id = $field->getFieldRef();
$ref_field = ilDataCollectionCache::getFieldCache($ref_field_id);
$ref_table = ilDataCollectionCache::getTableCache($ref_field->getTableId());
$options = array();
foreach($ref_table->getRecords() as $record)
{
$options[$record->getId()] = $record->getRecordFieldValue($ref_field_id);
}
// Sort by values ASC
asort($options);
$options = array('' => $lng->txt('dcl_any')) + $options;
$input->setOptions($options);
break;
$input = $table->addFilterItemByMetaType("filter_".$field->getId(), ilTable2GUI::FILTER_SELECT, false, $field->getId());
$options = array("" => $lng->txt("dcl_any"), 1 => ">1", 2 => ">2", 3 => ">3", 4 => ">4", 5 => "5");
$input->setOptions($options);
break;
$input = $table->addFilterItemByMetaType("filter_".$field->getId(), ilTable2GUI::FILTER_TEXT, false, $field->getId());
$input->setSubmitFormOnEnter(true);
break;
$input = $table->addFilterItemByMetaType("filter_".$field->getId(), ilTable2GUI::FILTER_TEXT, false, $field->getId());
$input->setSubmitFormOnEnter(true);
break;
}
if($input != NULL)
{
$input->setTitle($field->getTitle());
}
return $input;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilDataCollectionDatatype::checkValidity (   $type_id,
  $value 
)
static

now only distinguishes between number and text values

Parameters
$type_idint
$valuemixed
Returns
bool

Definition at line 196 of file class.ilDataCollectionDatatype.php.

Referenced by ilDataCollectionField\checkValidity().

{
//required is checked by form. so null input is valid.
if($value == NULL)
{
return true;
}
switch($type_id)
{
case self::INPUTFORMAT_NUMBER:
$return = is_numeric($value);
break;
default:
$return = true;
break;
}
return $return;
}

+ Here is the caller graph for this function:

ilDataCollectionDatatype::doRead ( )

Read Datatype.

Definition at line 131 of file class.ilDataCollectionDatatype.php.

References $query, getId(), setStorageLocation(), and setTitle().

Referenced by __construct().

{
global $ilDB;
$query = "SELECT * FROM il_dcl_datatype WHERE id = ".$ilDB->quote($this->getId(),"integer");
$set = $ilDB->query($query);
$rec = $ilDB->fetchAssoc($set);
$this->setTitle($rec["title"]);
$this->dbType = $rec["ildb_type"];
$this->setStorageLocation($rec["storage_location"]);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilDataCollectionDatatype::getAllDatatypes ( )
static

Get all possible Datatypes.

Returns
array

Definition at line 150 of file class.ilDataCollectionDatatype.php.

References $query.

Referenced by ilDataCollectionFieldEditGUI\getValues(), and ilDataCollectionFieldEditGUI\initForm().

{
global $ilDB;
$query = "SELECT * FROM il_dcl_datatype";
$set = $ilDB->query($query);
$all = array();
while($rec = $ilDB->fetchAssoc($set))
{
$all[$rec[id]] = $rec;
}
return $all;
}

+ Here is the caller graph for this function:

ilDataCollectionDatatype::getDbType ( )

Definition at line 123 of file class.ilDataCollectionDatatype.php.

References $dbType.

{
return $this->dbType;
}
ilDataCollectionDatatype::getId ( )

Get field id.

Returns
int

Definition at line 75 of file class.ilDataCollectionDatatype.php.

References $id.

Referenced by doRead().

{
return $this->id;
}

+ Here is the caller graph for this function:

static ilDataCollectionDatatype::getInputField ( ilDataCollectionField  $field)
static
Parameters
$type_id
ilDataCollectionField$field
Returns
ilCheckboxInputGUI|ilDateTimeInputGUI|ilFileInputGUI|ilTextInputGUI|NULL

Definition at line 221 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_ILIAS_REF, INPUTFORMAT_MOB, INPUTFORMAT_NUMBER, INPUTFORMAT_RATING, INPUTFORMAT_REFERENCE, INPUTFORMAT_TEXT, ilFormPropertyGUI\setInfo(), ilDateTimeInputGUI\setStartYear(), and ilTextInputGUI\setValue().

Referenced by ilDataCollectionRecordEditGUI\initForm().

{
global $lng;
$type_id = $field->getDatatypeId();
$title = $field->getTitle();
switch($type_id)
{
$input = new ilTextInputGUI($title, 'field_'.$field->getId());
if($field->getTextArea())
$input = new ilTextAreaInputGUI($title, 'field_'.$field->getId());
if($field->getLength()) {
$input->setInfo($lng->txt("dcl_max_text_length").": ".$field->getLength());
if (!$field->getTextArea()) $input->setMaxLength($field->getLength());
}
break;
$input = new ilTextInputGUI($title, 'field_'.$field->getId());
break;
$input = new ilCheckboxInputGUI($title, 'field_'.$field->getId());
break;
$input = new ilDateTimeInputGUI($title, 'field_'.$field->getId());
$input->setStartYear(date("Y")-100);
break;
$input = new ilFileInputGUI($title, 'field_'.$field->getId());
break;
$input = new ilSelectInputGUI($title, 'field_'.$field->getId());
break;
$input = new ilTextInputGUI($title, 'field_'.$field->getId());
$input->setValue($lng->txt("dcl_editable_in_table_gui"));
$input->setDisabled(true);
break;
$input = new ilDataCollectionTreePickInputGUI($title, 'field_'.$field->getId());
break;
$input = new ilImageFileInputGUI($title, 'field_'.$field->getId());
$input->setAllowDeletion(true);
break;
}
if($field->getDescription())
$input->setInfo($field->getDescription().($input->getInfo()?"<br>".$input->getInfo():""));
return $input;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilDataCollectionDatatype::getProperties (   $a_id)

Get all properties of a Datatype.

Parameters
int$a_iddatatype_id
Returns
array

Definition at line 173 of file class.ilDataCollectionDatatype.php.

References $query.

Referenced by ilDataCollectionFieldEditGUI\getValues(), ilDataCollectionFieldEditGUI\initForm(), and ilDataCollectionFieldEditGUI\save().

{
global $ilDB;
$query = "SELECT * FROM il_dcl_datatype_prop
WHERE datatype_id = ".$ilDB->quote($a_id,"integer");
$set = $ilDB->query($query);
$all = array();
while($rec = $ilDB->fetchAssoc($set))
{
$all[] = $rec;
}
return $all;
}

+ Here is the caller graph for this function:

ilDataCollectionDatatype::getStorageLocation ( )

Get Storage Location.

Returns
int

Definition at line 115 of file class.ilDataCollectionDatatype.php.

References $storageLocation.

ilDataCollectionDatatype::getTitle ( )

Get title.

Returns
string

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

References $title.

{
return $this->title;
}
ilDataCollectionDatatype::parseExportValue (   $value)

Function to parse incoming data from form input value $value.

returns the strin/number/etc. to store in the database.

Parameters
$value
Returns
int|string

Definition at line 550 of file class.ilDataCollectionDatatype.php.

References $file, ilObject2\_exists(), ilObject2\_lookupType(), INPUTFORMAT_BOOLEAN, INPUTFORMAT_DATETIME, INPUTFORMAT_FILE, and INPUTFORMAT_MOB.

{
$return = false;
{
if(!ilObject2::_exists($value) || ilObject2::_lookupType($value, false) != "file") {
return;
}
$file = $value;
if($file!="-")
{
$file_obj = new ilObjFile($file, false);
$file_name = $file_obj->getFileName();
$return = $file_name;
}
else
{
$return = $file;
}
}
{
$file = $value;
if($file!="-")
{
$mob = new ilObjMediaObject($file, false);
$mob_name = $mob->getTitle();
$return = $mob_name;
}
else
{
$return = $file;
}
}
{
$return = substr($value, 0, 10);
}
{
$return = $value ? 1 : 0;
}
else
{
$return = $value;
}
return $return;
}

+ Here is the call graph for this function:

ilDataCollectionDatatype::parseFormInput (   $value,
ilDataCollectionRecordField  $record_field 
)

function parses stored value to the variable needed to fill into the form for editing.

Parameters
$value
Returns
mixed

Definition at line 704 of file class.ilDataCollectionDatatype.php.

References ilObject2\_exists(), ilObject2\_lookupType(), ilDataCollectionRecordField\getField(), and ilDataCollectionField\PROPERTYID_TEXTAREA.

{
switch($this->id)
{
case self::INPUTFORMAT_DATETIME:
if(!$value || $value == "-")
return NULL;
//$datetime = new DateTime();
$input = array( "date" => substr($value, 0, -9),
"time" => "00:00:00");
break;
case self::INPUTFORMAT_FILE:
if(!ilObject2::_exists($value) || ilObject2::_lookupType($value, false) != "file") {
$input = "";
break;
}
$file_obj = new ilObjFile($value, false);
//$input = ilObjFile::_lookupAbsolutePath($value);
$input = $file_obj->getFileName();
break;
case self::INPUTFORMAT_MOB:
if(!ilObject2::_exists($value) || ilObject2::_lookupType($value, false) != "mob") {
$input = "";
break;
}
// $media_obj = new ilObjMediaObject($value, false);
//$input = ilObjFile::_lookupAbsolutePath($value);
$input = $value;
break;
case self::INPUTFORMAT_TEXT:
$arr_properties = $record_field->getField()->getProperties();
$breaks = array("<br />");
$input = str_ireplace($breaks, "", $value);
}
else
$input= $value;
break;
default:
$input = $value;
}
return $input;
}

+ Here is the call graph for this function:

ilDataCollectionDatatype::parseHTML (   $value,
ilDataCollectionRecordField  $record_field 
)

function parses stored value in database to a html output for eg.

the record list gui.

Parameters
$value
Returns
mixed

Definition at line 610 of file class.ilDataCollectionDatatype.php.

References $ilCtrl, ilObject2\_exists(), ilObjMediaObject\_getDirectory(), ilObject2\_lookupType(), ilDatePresentation\formatDate(), ilDataCollectionRecordField\getField(), ilUtil\getImagePath(), ilDataCollectionRecordField\getRecord(), IL_CAL_DATETIME, INPUTFORMAT_TEXT, and ilDataCollectionField\PROPERTYID_URL.

{
switch($this->id)
{
case self::INPUTFORMAT_DATETIME:
break;
case self::INPUTFORMAT_FILE:
global $ilCtrl;
if(!ilObject2::_exists($value) || ilObject2::_lookupType($value, false) != "file") {
$html = "-";
break;
}
$file_obj = new ilObjFile($value,false);
$ilCtrl->setParameterByClass("ildatacollectionrecordlistgui", "record_id", $record_field->getRecord()->getId());
$ilCtrl->setParameterByClass("ildatacollectionrecordlistgui", "field_id", $record_field->getField()->getId());
$html = "<a href=".$ilCtrl->getLinkTargetByClass("ildatacollectionrecordlistgui", "sendFile")." >".$file_obj->getFileName()."</a>";
break;
case self::INPUTFORMAT_MOB:
$mob = new ilObjMediaObject($value,false);
$dir = ilObjMediaObject::_getDirectory($mob->getId());
$media_item = $mob->getMediaItem('Standard');
if(!$media_item->location) {
$html = "";
break;
}
$html = '<img src="'.$dir."/".$media_item->location.'" />';
break;
case self::INPUTFORMAT_BOOLEAN:
switch($value)
{
case 0:
$im = ilUtil::getImagePath('icon_not_ok.png');
break;
case 1:
$im = ilUtil::getImagePath('icon_ok.png');
break;
}
$html = "<img src='".$im."'>";
break;
//Property URL
$arr_properties = $record_field->getField()->getProperties();
{
$link = $value;
if (preg_match("/^[a-z0-9!#$%&'*+=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i", $value))
$value = "mailto:".$value;
elseif(!(preg_match('~(^(news|(ht|f)tp(s?)\://){1}\S+)~i', $value)))
return $link;
if(strlen($link) > self::LINK_MAX_LENGTH){
$link = substr($value, 0, (self::LINK_MAX_LENGTH-3)/2);
$link.= "...";
$link .= substr($value, -(self::LINK_MAX_LENGTH-3)/2);
}
$html = "<a target='_blank' href='".$value."'>".$link."</a>";
}
else
{
$html = $value;
}
// BEGIN EASTEREGG
/*if(strtolower($value) == "nyan it plx!"){
$link = ilLink::_getLink($_GET['ref_id']);
$html = "<a href='http://nyanit.com/".$link."'>Data Collections rock!</a>";
}*/
// END EASTEREGG
break;
default:
$html = $value;
break;
}
return $html;
}

+ Here is the call graph for this function:

ilDataCollectionDatatype::parseValue (   $value,
ilDataCollectionRecordField  $record_field 
)

Function to parse incoming data from form input value $value.

returns the strin/number/etc. to store in the database.

Parameters
$value
ilDataCollectionRecordField$record_field
Returns
int|string

Definition at line 425 of file class.ilDataCollectionDatatype.php.

References $file, $location, $title, ilObjMediaObject\_determineWidthHeight(), ilObjMediaObject\_getDirectory(), ilObjMediaObject\_resizeImage(), ilObjMediaObject\_saveUsage(), 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, and ilUtil\renameExecutables().

{
$return = false;
{
$file = $value;
if($file['tmp_name'])
{
$file_obj = new ilObjFile();
$file_obj->setType("file");
$file_obj->setTitle($file["name"]);
$file_obj->setFileName($file["name"]);
$file_obj->setFileType(ilMimeTypeUtil::getMimeType("", $file["name"], $file["type"]));
$file_obj->setFileSize($file["size"]);
$file_obj->setMode("object");
$file_obj->create();
$file_obj->getUploadFile($file["tmp_name"], $file["name"]);
$file_id = $file_obj->getId();
$return = $file_id;
}else
$return = $record_field->getValue();
}
{
if($value == -1) //marked for deletion.
return 0;
$media = $value;
if($media['tmp_name'])
{
$mob = new ilObjMediaObject();
$mob->setTitle($media['name']);
$mob->create();
$mob_dir = ilObjMediaObject::_getDirectory($mob->getId());
if (!is_dir($mob_dir))
$mob->createDirectory();
$media_item = new ilMediaItem();
$mob->addMediaItem($media_item);
$media_item->setPurpose("Standard");
$file_name = ilUtil::getASCIIFilename($media['name']);
$file_name = str_replace(" ", "_", $file_name);
$file = $mob_dir."/".$file_name;
$title = $file_name;
ilUtil::moveUploadedFile($media['tmp_name'], $file_name, $file);
list($width, $height, $type, $attr) = getimagesize($file);
$arr_properties = $record_field->getField()->getProperties();
$new_width = $arr_properties[ilDataCollectionField::PROPERTYID_WIDTH];
$new_height = $arr_properties[ilDataCollectionField::PROPERTYID_HEIGHT];
if($new_width || $new_height)
{
//only resize if it is bigger, not if it is smaller
if($new_height < $height && $new_width < $width)
//resize proportional
if(!$new_height || !$new_width)
{
"File", $file, "",
true, false, $arr_properties[ilDataCollectionField::PROPERTYID_WIDTH], (int) $arr_properties[ilDataCollectionField::PROPERTYID_HEIGHT]);
}
else
{
$wh['width'] = (int) $arr_properties[ilDataCollectionField::PROPERTYID_WIDTH];
$wh['height'] = (int) $arr_properties[ilDataCollectionField::PROPERTYID_HEIGHT];
}
$location = ilObjMediaObject::_resizeImage($file,$wh['width'],$wh['height'],false);
} else {
}
ilObjMediaObject::_saveUsage($mob->getId(), "dcl:html", $record_field->getRecord()->getTable()->getCollectionObject()->getId());
$media_item->setFormat($format);
$media_item->setLocation($location);
$media_item->setLocationType("LocalFile");
$mob->update();
$return = $mob->getId();
}else
$return = $record_field->getValue();
}
{
return $value["date"]." ".$value["time"];
}
{
$return = $value ? 1 : 0;
$arr_properties = $record_field->getField()->getProperties();
$return = nl2br($value);
else
$return = $value;
}
$return = ($value == '') ? null : $value; //SW, Ilias Mantis #0011799: Return null otherwise '' is casted to 0 in DB
} else
{
$return = $value;
}
return $return;
}

+ Here is the call graph for this function:

static ilDataCollectionDatatype::passThroughFilter ( ilDataCollectionRecord  $record,
ilDataCollectionField  $field,
  $filter 
)
static

Definition at line 347 of file class.ilDataCollectionDatatype.php.

References $pass, ilObject2\_exists(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject2\_lookupType(), ilDataCollectionField\getDatatypeId(), ilDataCollectionField\getId(), ilDataCollectionRecord\getRecordFieldValue(), INPUTFORMAT_BOOLEAN, INPUTFORMAT_DATETIME, INPUTFORMAT_FILE, INPUTFORMAT_ILIAS_REF, INPUTFORMAT_MOB, INPUTFORMAT_NUMBER, INPUTFORMAT_RATING, INPUTFORMAT_REFERENCE, and INPUTFORMAT_TEXT.

Referenced by ilDataCollectionRecord\passThroughFilter().

{
$pass = false;
$type_id = $field->getDatatypeId();
$value = $record->getRecordFieldValue($field->getId());
switch($type_id)
{
if(!$filter || strpos(strtolower($value), strtolower($filter)) !== false)
$pass = true;
break;
if((!$filter['from'] || $value >= $filter['from']) && (!$filter['to'] || $value <= $filter['to']))
$pass = true;
break;
if((($filter == "checked" && $value == 1) || ($filter == "not_checked" && $value == 0))|| $filter == '' || !$filter)
$pass = true;
break;
if((!$filter['from'] || $value >= $filter['from']) && (!$filter['to'] || $value <= $filter['to']))
$pass = true;
break;
if(!ilObject2::_exists($value) || ilObject2::_lookupType($value, false) != "file") {
$pass = true;
break;
}
$file_obj = new ilObjFile($value, false);
$file_name = $file_obj->getTitle();
if(!$filter || strpos(strtolower($file_name), strtolower($filter)) !== false)
$pass = true;
break;
if(!$filter || $filter == $value)
$pass = true;
break;
if(!$filter || $filter <= $value['avg'])
$pass = true;
break;
$obj_id = ilObject::_lookupObjId($value);
if(!$filter || strpos(strtolower(ilObject::_lookupTitle($obj_id)), strtolower($filter)) !== false)
$pass = true;
break;
$m_obj = new ilObjMediaObject($value, false);
$file_name = $m_obj->getTitle();
if(!$filter || strpos(strtolower($file_name), strtolower($filter)) !== false)
$pass = true;
break;
}
//for the fields owner and last edit by, we check the name, not the ID
if(($field->getId() == "owner" || $field->getId() == "last_edit_by") && $filter)
{
$pass = false;
$user = new ilObjUser($value);
if(strpos($user->getFullname(), $filter) !== false)
{
$pass = true;
}
}
return $pass;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilDataCollectionDatatype::setStorageLocation (   $a_id)

Set Storage Location.

Parameters
int$a_id

Definition at line 105 of file class.ilDataCollectionDatatype.php.

Referenced by doRead().

{
$this->storageLocation = $a_id;
}

+ Here is the caller graph for this function:

ilDataCollectionDatatype::setTitle (   $a_title)

Set title.

Parameters
string$a_title

Definition at line 85 of file class.ilDataCollectionDatatype.php.

Referenced by doRead().

{
$this->title = $a_title;
}

+ Here is the caller graph for this function:

Field Documentation

ilDataCollectionDatatype::$dbType
protected

Definition at line 31 of file class.ilDataCollectionDatatype.php.

Referenced by getDbType().

ilDataCollectionDatatype::$id
protected

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

Referenced by getId().

ilDataCollectionDatatype::$storageLocation
protected

Definition at line 30 of file class.ilDataCollectionDatatype.php.

Referenced by getStorageLocation().

ilDataCollectionDatatype::$title
protected

Definition at line 29 of file class.ilDataCollectionDatatype.php.

Referenced by getInputField(), getTitle(), and parseValue().

const ilDataCollectionDatatype::LINK_MAX_LENGTH = 30

Definition at line 52 of file class.ilDataCollectionDatatype.php.


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