ILIAS  Release_5_0_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.
 cloneStructure (ilDataCollectionStandardField $original_record)
 getLocked ()
 isStandardField ()
 isUnique ()
- Public Member Functions inherited from ilDataCollectionField
 __construct ($a_id=0)
 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 (ilDataCollectionField $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_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 PROPERTYID_FORMULA_EXPRESSION = 12
const PROPERTYID_DISPLAY_COPY_LINK_ACTION_MENU = 13
const PROPERTYID_LINK_DETAIL_PAGE_TEXT = 14
const PROPERTYID_LINK_DETAIL_PAGE_MOB = 15
const PROPERTYID_SUPPORTED_FILE_TYPES = 16
const VIEW_VIEW = 1
const EDIT_VIEW = 2
const FILTER_VIEW = 3
const EXPORTABLE_VIEW = 4
- Protected Member Functions inherited from ilDataCollectionField
 loadDatatype ()
 loadVisibility ()
 loadFilterability ()
 loadViewDefinition ($view)
 loadViewDefinition
 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 134 of file class.ilDataCollectionStandardField.php.

References ilDataCollectionField\$datatype, and ilDataCollectionField\$id.

Referenced by ilDataCollectionField\getDatatypeId().

{
$datatype = null;
foreach (self::_getStandardFieldsAsArray() as $fields_data) {
if ($id == $fields_data['id']) {
$datatype = $fields_data['datatype_id'];
break;
}
}
return $datatype;
}

+ Here is the caller graph for this function:

static ilDataCollectionStandardField::_getStandardFields (   $table_id)
static

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

References ilDataCollectionField\$table_id.

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

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

References $lng, ilDataCollectionDatatype\INPUTFORMAT_DATETIME, ilDataCollectionDatatype\INPUTFORMAT_NONE, 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),
array('id' => 'comments', 'title' => $lng->txt('dcl_comments'), 'description' => $lng->txt('dcl_comments_description'), 'datatype_id' => ilDataCollectionDatatype::INPUTFORMAT_NONE, 'required' => false),
);
return $stdfields;
}
static ilDataCollectionStandardField::_isStandardField (   $field_id)
static

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

Referenced by ilDataCollectionRecord\getRecordFieldExportValue(), ilDataCollectionRecord\getRecordFieldFormInput(), ilDataCollectionRecord\getRecordFieldHTML(), ilDataCollectionRecord\getRecordFieldSortingValue(), 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().

Referenced by cloneStructure().

{
$this->updateVisibility();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilDataCollectionStandardField::getLocked ( )
Returns
boolean

Reimplemented from ilDataCollectionField.

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

Referenced by cloneStructure().

{
return true;
}

+ Here is the caller graph for this function:

ilDataCollectionStandardField::isStandardField ( )

Reimplemented from ilDataCollectionField.

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

{
return true;
}
ilDataCollectionStandardField::isUnique ( )

Reimplemented from ilDataCollectionField.

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

Referenced by cloneStructure().

{
return false;
}

+ Here is the caller graph for this function:


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