ILIAS  Release_4_4_x_branch Revision 61816
 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)
 getExportable ()
 toArray ()
 buildFromDBRecord ($rec)
 getFilterable ()
 doDelete ()
 getOrder ()
 setOrder ($order)
 getFieldRef ()
 getFieldReflist ()
 isNRef ()
 getProperties ()
 Get all properties of a field.
 setProperties ($data)
 setLocked ($locked)
 checkValidity ($value, $record_id=null)
 cloneStructure ($original_id)
 cloneProperties ($originalField)
 setExportable ($exportable)

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 filed 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_REFERENCELIST = 11
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 PROPERTYID_N_REFERENCE = 11
const VIEW_VIEW = 1
const EDIT_VIEW = 2
const FILTER_VIEW = 3
const EXPORTABLE_VIEW = 4
- Protected Member Functions inherited from ilDataCollectionField
 updateProperties ()
 Update properties of this field in Database.
 updateVisibility ()
 updateFilterability ()
 updateEditability ()
 updateExportability ()
- Protected Attributes inherited from ilDataCollectionField
 $id
 $table_id
 $title
 $description
 $datatypeId
 $required
 $order
 $unique
 $visible
 $editable
 $filterable
 $locked
 $property = array()
 $exportable
 $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 116 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 81 of file class.ilDataCollectionStandardField.php.

References ilDataCollectionField\$table_id, and _getDatatypeForId().

Referenced by ilDataCollectionTable\getFields(), and ilDataCollectionTable\getStandardFields().

{
$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 63 of file class.ilDataCollectionStandardField.php.

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

{
//TODO: this isn't particularly pretty especially as $lng is used in the model. On the long run the standard fields should be refactored into "normal" fields.
global $lng;
$stdfields = array(
array("id"=>"id", "title" => $lng->txt("dcl_id"), "description" => $lng->txt("dcl_id_description"), "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_NUMBER, "required" => true),
array("id"=>"create_date", "title" => $lng->txt("dcl_creation_date"), "description" => $lng->txt("dcl_creation_date_description"), "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_DATETIME, "required" => true),
array("id"=>"last_update", "title" => $lng->txt("dcl_last_update"), "description" => $lng->txt("dcl_last_update_description"), "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_DATETIME, "required" => true),
array("id"=>"owner", "title" => $lng->txt("dcl_owner"), "description" => $lng->txt("dcl_owner_description"), "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_TEXT, "required" => true),
array("id"=>"last_edit_by", "title" => $lng->txt("dcl_last_edited_by"), "description" => $lng->txt("dcl_last_edited_by_description"), "datatype_id" => ilDataCollectionDatatype::INPUTFORMAT_TEXT, "required" => true)
);
return $stdfields;
}
static ilDataCollectionStandardField::_isStandardField (   $field_id)
static

Definition at line 98 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\updateExportability(), 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 55 of file class.ilDataCollectionStandardField.php.

{
return true;
}
ilDataCollectionStandardField::isStandardField ( )

Reimplemented from ilDataCollectionField.

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

{
return true;
}
ilDataCollectionStandardField::isUnique ( )

Reimplemented from ilDataCollectionField.

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

{
return false;
}

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