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

Class ilDataCollectionField. More...

+ Inheritance diagram for ilDataCollectionStandardField:
+ Collaboration diagram for ilDataCollectionStandardField:

Public Member Functions

 doRead ()
 Read field.
 doCreate ()
 Create new field.
 doUpdate ()
 Update field.
 getLocked ()
 isStandardField ()
 isUnique ()
- Public Member Functions inherited from ilDataCollectionField
 __construct ($a_id=0)
 Constructor public.
 setId ($a_id)
 Set field id.
 getId ()
 Get field id.
 setTableId ($a_id)
 Set table id.
 getTableId ()
 Get table id.
 setTitle ($a_title)
 Set title.
 getTitle ()
 Get title.
 setDescription ($a_desc)
 Set description.
 getDescription ()
 Get description.
 setDatatypeId ($a_id)
 Set datatype id.
 getDatatypeId ()
 Get datatype_id.
 setRequired ($a_required)
 Set Required.
 getRequired ()
 Get Required Required.
 setPropertyvalue ($a_value, $a_id)
 Set Property Value.
 setUnique ($unique)
 getPropertyvalues ()
 Get Property Values.
 setVisible ($visible)
 setVisible
 setFilterable ($filterable)
 setFilterable
 getDatatype ()
 getLength ()
 getTextArea ()
 getLearningProgress ()
 getDatatypeTitle ()
 getStorageLocation ()
 isVisible ()
 isFilterable ()
 isEditable ()
 isEditable
 setEditable ($editable)
 toArray ()
 buildFromDBRecord ($rec)
 doDelete ()
 getOrder ()
 setOrder ($order)
 getFieldRef ()
 getProperties ()
 Get all properties of a field.
 setProperties ($data)
 setLocked ($locked)
 checkValidity ($value, $record_id=null)
 cloneStructure ($original_id)
 cloneProperties ($originalField)

Static Public Member Functions

static _getStandardFieldsAsArray ()
static _getStandardFields ($table_id)
static _isStandardField ($field_id)
static _getDatatypeForId ($id)
 gives you the datatype id of a specified standard field.
- Static Public Member Functions inherited from ilDataCollectionField
static _getTitleValidChars ($a_as_regex=true)
 All valid chars for field titles.
static _getFieldIdByTitle ($title, $table_id)

Additional Inherited Members

- Data Fields inherited from ilDataCollectionField
const PROPERTYID_LENGTH = 1
const PROPERTYID_REGEX = 2
const PROPERTYID_REFERENCE = 3
const PROPERTYID_URL = 4
 LINK OR EMAIL!
const PROPERTYID_TEXTAREA = 5
const PROPERTYID_REFERENCE_LINK = 6
const PROPERTYID_WIDTH = 7
const PROPERTYID_HEIGHT = 8
const PROPERTYID_LEARNING_PROGRESS = 9
const PROPERTYID_ILIAS_REFERENCE_LINK = 10
const VIEW_VIEW = 1
const EDIT_VIEW = 2
const FILTER_VIEW = 3
- Protected Member Functions inherited from ilDataCollectionField
 updateProperties ()
 Update properties of this field in Database.
 updateVisibility ()
 updateFilterability ()
 updateEditability ()
- Protected Attributes inherited from ilDataCollectionField
 $id
 $table_id
 $title
 $description
 $datatypeId
 $required
 $order
 $unique
 $visible
 $editable
 $filterable
 $locked
 $property = array()
 $datatype

Detailed Description

Member Function Documentation

static ilDataCollectionStandardField::_getDatatypeForId (   $id)
static

gives you the datatype id of a specified standard field.

Parameters
$idthe id of the standardfield eg. "create_date"

Definition at line 113 of file class.ilDataCollectionStandardField.php.

References ilDataCollectionField\$id, ilDataCollectionDatatype\INPUTFORMAT_DATETIME, ilDataCollectionDatatype\INPUTFORMAT_NUMBER, and ilDataCollectionDatatype\INPUTFORMAT_TEXT.

Referenced by _getStandardFields(), and ilDataCollectionField\getDatatypeId().

{
switch($id)
{
case 'id':
case 'owner';
case 'create_date':
case 'last_edit_by':
case 'table_id':
case 'last_update':
}
return NULL;
}

+ Here is the caller graph for this function:

static ilDataCollectionStandardField::_getStandardFields (   $table_id)
static

Definition at line 78 of file class.ilDataCollectionStandardField.php.

References ilDataCollectionField\$table_id, and _getDatatypeForId().

Referenced by ilDataCollectionTable\getFields().

{
$stdFields = array();
foreach(self::_getStandardFieldsAsArray() as $array)
{
$array["table_id"] = $table_id;
$array["datatype_id"] = self::_getDatatypeForId($array["id"]);
$field->buildFromDBRecord($array);
array_push($stdFields, $field);
}
return $stdFields;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilDataCollectionStandardField::_getStandardFieldsAsArray ( )
static

Definition at line 62 of file class.ilDataCollectionStandardField.php.

References ilDataCollectionDatatype\INPUTFORMAT_DATETIME, ilDataCollectionDatatype\INPUTFORMAT_NUMBER, and ilDataCollectionDatatype\INPUTFORMAT_TEXT.

{
$stdfields = array(
array("id"=>"id", "title" => "id", "Description" => "The internal ID", "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_NUMBER, "required" => true),
//array("id"=>"table_id", "title" => "Table id", "description" => "The internal ID of the table", "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_NUMBER, "required" => true),
array("id"=>"create_date", "title" => "Creation Date", "description" => "The date this record was created", "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_DATETIME, "required" => true),
array("id"=>"last_update", "title" => "Last Update", "description" => "The last time this record was updated", "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_DATETIME, "required" => true),
array("id"=>"owner", "title" => "Owner", "description" => "The owner of this record", "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_TEXT, "required" => true),
array("id"=>"last_edit_by", "title" => "Last edited by", "description" => "The user who did the last edit on this record", "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_TEXT, "required" => true)
);
return $stdfields;
}
static ilDataCollectionStandardField::_isStandardField (   $field_id)
static

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

Referenced by ilDataCollectionRecord\getRecordFieldExportValue(), ilDataCollectionRecord\getRecordFieldFormInput(), ilDataCollectionRecord\getRecordFieldHTML(), ilDataCollectionRecord\getRecordFieldSingleHTML(), ilDataCollectionRecord\getRecordFieldValue(), and ilDataCollectionRecord\setRecordFieldValue().

{
$return = false;
foreach(self::_getStandardFieldsAsArray() as $field)
{
if($field["id"] == $field_id)
{
$return = true;
}
}
return $return;
}

+ Here is the caller graph for this function:

ilDataCollectionStandardField::doCreate ( )

Create new field.

Reimplemented from ilDataCollectionField.

Definition at line 34 of file class.ilDataCollectionStandardField.php.

References $ilLog, and ilUtil\sendFailure().

{
global $ilLog;
$message = "Standard fields cannot be written to DB";
$ilLog->write("[ilDataCollectionStandardField] ".$message);
}

+ Here is the call graph for this function:

ilDataCollectionStandardField::doRead ( )

Read field.

Reimplemented from ilDataCollectionField.

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

References $ilLog, and ilUtil\sendFailure().

{
global $ilLog;
$message = "Standard fields cannot be read from DB";
$ilLog->write("[ilDataCollectionStandardField] ".$message);
}

+ Here is the call graph for this function:

ilDataCollectionStandardField::doUpdate ( )

Update field.

Reimplemented from ilDataCollectionField.

Definition at line 45 of file class.ilDataCollectionStandardField.php.

References ilDataCollectionField\updateFilterability(), and ilDataCollectionField\updateVisibility().

{
$this->updateVisibility();
}

+ Here is the call graph for this function:

ilDataCollectionStandardField::getLocked ( )
Returns
boolean

Reimplemented from ilDataCollectionField.

Definition at line 54 of file class.ilDataCollectionStandardField.php.

{
return true;
}
ilDataCollectionStandardField::isStandardField ( )

Reimplemented from ilDataCollectionField.

Definition at line 136 of file class.ilDataCollectionStandardField.php.

{
return true;
}
ilDataCollectionStandardField::isUnique ( )

Reimplemented from ilDataCollectionField.

Definition at line 144 of file class.ilDataCollectionStandardField.php.

{
return false;
}

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