ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAdvancedMDRecordGUI Class Reference
+ Collaboration diagram for ilAdvancedMDRecordGUI:

Public Member Functions

 __construct ($a_mode, $a_obj_type= '', $a_obj_id= '', $a_sub_type= '', $a_sub_id= '')
 Constructor.
 setPropertyForm ($form)
 set property form object
 setSearchValues ($a_values)
 Set values for search form.
 setInfoObject ($info)
 get info sections
 setSelectedOnly ($a_val)
 Set selected only flag.
 getSelectedOnly ()
 Get selected only flag.
 parse ()
 Get HTML.
 importEditFormPostValues ()
 Load edit form values from post.
 writeEditForm ()
 Write edit form values to db.
 importSearchForm ()
 Load edit form values from post.
 setSearchFormValues (array $a_values)
 parseRecordSelection ($a_sec_head="")
 Parse property form in editor mode.
 saveSelection ()
 Save selection per object.
 setTableGUI ($a_val)
 Set table.
 getTableGUI ()
 Get table.
 setRowData ($a_val)
 Set row data.
 getRowData ()
 Get row data.
 importFilter ()
 Import filter (post) values.
 getFilterElements ()
 Get SQL conditions for current filter value(s)

Data Fields

const MODE_EDITOR = 1
const MODE_SEARCH = 2
const MODE_INFO = 3
const MODE_REC_SELECTION = 4
const MODE_FILTER = 5
const MODE_TABLE_HEAD = 6
const MODE_TABLE_CELLS = 7

Protected Member Functions

 parseEditor ()
 Parse property form in editor mode.
 parseDuration ($u_start, $u_end)
 parse hours and minutes from duration

Protected Attributes

 $lng
 $editor_form

Private Member Functions

 parseSearch ()
 Parse search.
 parseInfoPage ()
 handleECSDefinitions ($a_definition)
 handle ecs definitions
 showECSStart ($def)
 Show special form for ecs start.
 parseFilter ()
 Parse property for filter (table)
 parseTableHead ()
 Parse property for table head.
 parseTableCells ()
 Parse table cells.

Private Attributes

 $mode
 $obj_type
 $sub_type
 $obj_id
 $form
 $search_values = array()

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 14 of file class.ilAdvancedMDRecordGUI.php.

Constructor & Destructor Documentation

ilAdvancedMDRecordGUI::__construct (   $a_mode,
  $a_obj_type = '',
  $a_obj_id = '',
  $a_sub_type = '',
  $a_sub_id = '' 
)

Constructor.

public

Parameters
intmode either MODE_EDITOR or MODE_SEARCH
intobj_type

Definition at line 46 of file class.ilAdvancedMDRecordGUI.php.

References $lng.

{
global $lng;
$this->lng = $lng;
$this->mode = $a_mode;
$this->obj_type = $a_obj_type;
$this->obj_id = $a_obj_id;
$this->sub_type = $a_sub_type;
$this->sub_id = $a_sub_id;
}

Member Function Documentation

ilAdvancedMDRecordGUI::getFilterElements ( )

Get SQL conditions for current filter value(s)

Returns
array

Definition at line 721 of file class.ilAdvancedMDRecordGUI.php.

References $res.

{
if(!is_array($this->adt_search))
{
return;
}
$res = array();
foreach($this->adt_search as $def_id => $element)
{
if(!$element->isNull())
{
$res[$def_id] = $element;
}
}
return $res;
}
ilAdvancedMDRecordGUI::getRowData ( )

Get row data.

Returns
array assoc array of row data (containing md record data)

Definition at line 638 of file class.ilAdvancedMDRecordGUI.php.

Referenced by parseTableCells().

{
return $this->row_data;
}

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::getSelectedOnly ( )

Get selected only flag.

Returns
boolean retrieve only records, that are selected by the object

Definition at line 109 of file class.ilAdvancedMDRecordGUI.php.

Referenced by parseEditor(), parseFilter(), parseSearch(), parseTableCells(), and parseTableHead().

{
return $this->selected_only;
}

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::getTableGUI ( )

Get table.

Returns
object table gui class

Definition at line 618 of file class.ilAdvancedMDRecordGUI.php.

{
return $this->table_gui;
}
ilAdvancedMDRecordGUI::handleECSDefinitions (   $a_definition)
private

handle ecs definitions

private

Parameters
objectilAdvMDFieldDefinition
Returns

Definition at line 401 of file class.ilAdvancedMDRecordGUI.php.

References ilECSServerSettings\getInstance().

Referenced by parseTableCells(), and parseTableHead().

{
include_once('./Services/WebServices/ECS/classes/class.ilECSDataMappingSettings.php');
include_once('./Services/WebServices/ECS/classes/class.ilECSServerSettings.php');
if(ilECSServerSettings::getInstance()->activeServerExists() or
($this->obj_type != 'crs' and $this->obj_type != 'rcrs')
)
{
return false;
}
return false;
/*
$mapping = ilECSDataMappingSettings::_getInstance();
if($mapping->getMappingByECSName(ilECSDataMappingSetting::MAPPING_IMPORT_RCRS, 'begin') == $a_definition->getFieldId())
{
$this->showECSStart($a_definition);
return true;
}
if($mapping->getMappingByECSName(ilECSDataMappingSetting::MAPPING_IMPORT_RCRS, 'end') == $a_definition->getFieldId())
{
return true;
}
if($mapping->getMappingByECSName(ilECSDataMappingSetting::MAPPING_IMPORT_RCRS, 'cycle') == $a_definition->getFieldId())
{
return true;
}
if($mapping->getMappingByECSName(ilECSDataMappingSetting::MAPPING_IMPORT_RCRS, 'room') == $a_definition->getFieldId())
{
return true;
}
*/
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::importEditFormPostValues ( )

Load edit form values from post.

Returns
bool

Definition at line 219 of file class.ilAdvancedMDRecordGUI.php.

References $valid.

{
// #13774
if(!is_array($this->editor_form))
{
return false;
}
$valid = true;
foreach($this->editor_form as $item)
{
$item["form"]->importFromPost();
if(!$item["form"]->validate())
{
$valid = false;
}
}
return $valid;
}
ilAdvancedMDRecordGUI::importFilter ( )

Import filter (post) values.

Definition at line 703 of file class.ilAdvancedMDRecordGUI.php.

{
if(!is_array($this->adt_search))
{
return;
}
foreach($this->adt_search as $element)
{
$element->importFromPost();
}
}
ilAdvancedMDRecordGUI::importSearchForm ( )

Load edit form values from post.

Returns
array

Definition at line 324 of file class.ilAdvancedMDRecordGUI.php.

References $res, and $valid.

{
if(!sizeof($this->search_form))
{
return false;
}
$valid = true;
$res = array();
foreach($this->search_form as $field_id => $item)
{
$item["value"]->importFromPost();
if(!$item["value"]->validate())
{
$valid = false;
}
$value = $item["def"]->getSearchValueSerialized($item["value"]);
if($value !== null)
{
$res[$field_id] = $value;
}
}
if($valid)
{
return $res;
}
}
ilAdvancedMDRecordGUI::parse ( )

Get HTML.

public

Parameters

Definition at line 121 of file class.ilAdvancedMDRecordGUI.php.

References parseEditor(), parseFilter(), parseInfoPage(), parseRecordSelection(), parseSearch(), parseTableCells(), and parseTableHead().

{
switch($this->mode)
{
case self::MODE_EDITOR:
return $this->parseEditor();
case self::MODE_SEARCH:
return $this->parseSearch();
case self::MODE_INFO:
return $this->parseInfoPage();
case self::MODE_REC_SELECTION:
return $this->parseRecordSelection();
case self::MODE_FILTER:
return $this->parseFilter();
case self::MODE_TABLE_HEAD:
return $this->parseTableHead();
case self::MODE_TABLE_CELLS:
return $this->parseTableCells();
default:
die('Not implemented yet');
}
}

+ Here is the call graph for this function:

ilAdvancedMDRecordGUI::parseDuration (   $u_start,
  $u_end 
)
protected

parse hours and minutes from duration

protected

Parameters
@return

Definition at line 535 of file class.ilAdvancedMDRecordGUI.php.

Referenced by showECSStart().

{
if($u_start >= $u_end)
{
return array(0,0);
}
$diff = $u_end - $u_start;
$hours = (int) ($diff / (60 * 60));
$min = (int) (($diff % 3600) / 60);
return array($hours,$min);
}

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::parseEditor ( )
protected

Parse property form in editor mode.

Definition at line 159 of file class.ilAdvancedMDRecordGUI.php.

References ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilADTFactory\getInstance(), and getSelectedOnly().

Referenced by parse().

{
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
if ($this->getSelectedOnly())
{
$recs = ilAdvancedMDRecord::_getSelectedRecordsByObject($this->obj_type, $this->obj_id, $this->sub_type);
}
else
{
$recs = ilAdvancedMDRecord::_getActivatedRecordsByObjectType($this->obj_type, $this->sub_type);
}
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
$this->editor_form = array();
foreach($recs as $record_obj)
{
/* :TODO:
if($this->handleECSDefinitions($def))
{
continue;
}
*/
$record_id = $record_obj->getRecordId();
$values = new ilAdvancedMDValues($record_id, $this->obj_id, $this->sub_type, $this->sub_id);
$values->read();
$adt_group_form = ilADTFactory::getInstance()->getFormBridgeForInstance($values->getADTGroup());
$adt_group_form->setForm($this->form);
$adt_group_form->setTitle($record_obj->getTitle());
$adt_group_form->setInfo($record_obj->getDescription());
foreach($values->getDefinitions() as $def)
{
$element = $adt_group_form->getElement($def->getFieldId());
$element->setTitle($def->getTitle());
$element->setInfo($def->getDescription());
// definition may customize ADT form element
$def->prepareElementForEditor($element);
if($values->isDisabled($def->getFieldId()))
{
$element->setDisabled(true);
}
}
$adt_group_form->addToForm();
$this->editor_form[$record_id] = array("values"=>$values, "form"=>$adt_group_form);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::parseFilter ( )
private

Parse property for filter (table)

private

Definition at line 649 of file class.ilAdvancedMDRecordGUI.php.

References ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilADTFactory\getInstance(), ilAdvancedMDFieldDefinition\getInstancesByRecordId(), getSelectedOnly(), ilAdvancedMDFieldDefinition\TYPE_DATE, ilAdvancedMDFieldDefinition\TYPE_DATETIME, ilAdvancedMDFieldDefinition\TYPE_SELECT, ilAdvancedMDFieldDefinition\TYPE_SELECT_MULTI, and ilAdvancedMDFieldDefinition\TYPE_TEXT.

Referenced by parse().

{
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
if ($this->getSelectedOnly())
{
$recs = ilAdvancedMDRecord::_getSelectedRecordsByObject($this->obj_type, $this->obj_id, $this->sub_type);
}
else
{
$recs = ilAdvancedMDRecord::_getActivatedRecordsByObjectType($this->obj_type, $this->sub_type);
}
$this->adt_search = array();
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
foreach($recs as $record_obj)
{
$record_id = $record_obj->getRecordId();
foreach($defs as $def)
{
// :TODO: not all types supported yet
if(!in_array($def->getType(), array(
{
continue;
}
/* :TODO:
if($this->handleECSDefinitions($def))
{
continue;
}
*/
$this->adt_search[$def->getFieldId()] = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($def->getADTDefinition(), true, false);
$this->adt_search[$def->getFieldId()]->setTableGUI($this->table_gui);
$this->adt_search[$def->getFieldId()]->setTitle($def->getTitle());
$this->adt_search[$def->getFieldId()]->setElementId('md_'.$def->getFieldId());
$this->adt_search[$def->getFieldId()]->loadFilter();
$this->adt_search[$def->getFieldId()]->addToForm();
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::parseInfoPage ( )
private

Definition at line 364 of file class.ilAdvancedMDRecordGUI.php.

References ilAdvancedMDRecord\_lookupTitle(), ilADTFactory\getInstance(), and ilAdvancedMDValues\getInstancesForObjectId().

Referenced by parse().

{
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
include_once('Services/ADT/classes/class.ilADTFactory.php');
foreach(ilAdvancedMDValues::getInstancesForObjectId($this->obj_id, $this->obj_type) as $record_id => $a_values)
{
// this correctly binds group and definitions
$a_values->read();
$this->info->addSection(ilAdvancedMDRecord::_lookupTitle($record_id));
$defs = $a_values->getDefinitions();
foreach($a_values->getADTGroup()->getElements() as $element_id => $element)
{
if(!$element->isNull())
{
$this->info->addProperty($defs[$element_id]->getTitle(),
ilADTFactory::getInstance()->getPresentationBridgeForInstance($element)->getHTML());
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::parseRecordSelection (   $a_sec_head = "")

Parse property form in editor mode.

private

Definition at line 558 of file class.ilAdvancedMDRecordGUI.php.

References $ilUser, $section, ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), ilAdvancedMDRecord\getObjRecSelection(), and ilFormPropertyGUI\setInfo().

Referenced by parse().

{
global $ilUser;
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
$first = true;
foreach(ilAdvancedMDRecord::_getActivatedRecordsByObjectType($this->obj_type, $this->sub_type) as $record_obj)
{
$selected = ilAdvancedMDRecord::getObjRecSelection($this->obj_id, $this->sub_type);
if ($first)
{
$first = false;
$sec_tit = ($a_sec_head == "")
? $this->lng->txt("meta_adv_records")
: $a_sec_head;
$section->setTitle($sec_tit);
$this->form->addItem($section);
}
// checkbox for each active record
$cb = new ilCheckboxInputGUI($record_obj->getTitle(), "amet_use_rec[]");
$cb->setInfo($record_obj->getDescription());
$cb->setValue($record_obj->getRecordId());
if (in_array($record_obj->getRecordId(), $selected))
{
$cb->setChecked(true);
}
$this->form->addItem($cb);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::parseSearch ( )
private

Parse search.

Definition at line 269 of file class.ilAdvancedMDRecordGUI.php.

References $section, ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilADTFactory\getInstance(), ilAdvancedMDFieldDefinition\getInstancesByRecordId(), and getSelectedOnly().

Referenced by parse().

{
// this is NOT used for the global search, see ilLuceneAdvancedSearchFields::getFormElement()
// (so searchable flag is NOT relevant)
//
// current usage: wiki page element "[amd] page list"
$this->lng->loadLanguageModule('search');
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
if ($this->getSelectedOnly())
{
$recs = ilAdvancedMDRecord::_getSelectedRecordsByObject($this->obj_type, $this->obj_id, $this->sub_type);
}
else
{
$recs = ilAdvancedMDRecord::_getActivatedRecordsByObjectType($this->obj_type, $this->sub_type);
}
$this->search_form = array();
foreach($recs as $record)
{
$section->setTitle($record->getTitle());
$section->setInfo($record->getDescription());
$this->form->addItem($section);
foreach(ilAdvancedMDFieldDefinition::getInstancesByRecordId($record->getRecordId(), true) as $field)
{
$field_form = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($field->getADTDefinition(), true, false);
$field_form->setForm($this->form);
$field_form->setElementId("advmd[".$field->getFieldId()."]");
$field_form->setTitle($field->getTitle());
if(is_array($this->search_form_values) &&
isset($this->search_form_values[$field->getFieldId()]))
{
$field->setSearchValueSerialized($field_form, $this->search_form_values[$field->getFieldId()]);
}
$field->prepareElementForSearch($field_form);
$field_form->addToForm();
$this->search_form[$field->getFieldId()] = array("def"=>$field, "value"=>$field_form);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::parseTableCells ( )
private

Parse table cells.

Definition at line 780 of file class.ilAdvancedMDRecordGUI.php.

References $ilUser, ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), getRowData(), getSelectedOnly(), and handleECSDefinitions().

Referenced by parse().

{
global $ilUser;
$data = $this->getRowData();
$html = "";
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
if ($this->getSelectedOnly())
{
$recs = ilAdvancedMDRecord::_getSelectedRecordsByObject($this->obj_type, $this->obj_id, $this->sub_type);
}
else
{
$recs = ilAdvancedMDRecord::_getActivatedRecordsByObjectType($this->obj_type, $this->sub_type);
}
foreach($recs as $record_obj)
{
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
foreach(ilAdvancedMDFieldDefinition::_getDefinitionsByRecordId($record_obj->getRecordId()) as $def)
{
if($this->handleECSDefinitions($def))
{
continue;
}
$html.= "<td class='std'>".$data['md_'.$def->getFieldId()]."</td>";
}
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::parseTableHead ( )
private

Parse property for table head.

Definition at line 749 of file class.ilAdvancedMDRecordGUI.php.

References $ilUser, ilAdvancedMDRecord\_getActivatedRecordsByObjectType(), ilAdvancedMDRecord\_getSelectedRecordsByObject(), getSelectedOnly(), and handleECSDefinitions().

Referenced by parse().

{
global $ilUser;
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
if ($this->getSelectedOnly())
{
$recs = ilAdvancedMDRecord::_getSelectedRecordsByObject($this->obj_type, $this->obj_id, $this->sub_type);
}
else
{
$recs = ilAdvancedMDRecord::_getActivatedRecordsByObjectType($this->obj_type, $this->sub_type);
}
foreach($recs as $record_obj)
{
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
foreach(ilAdvancedMDFieldDefinition::_getDefinitionsByRecordId($record_obj->getRecordId()) as $def)
{
if($this->handleECSDefinitions($def))
{
continue;
}
$this->table_gui->addColumn($def->getTitle(),'md_'.$def->getFieldId());
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::saveSelection ( )

Save selection per object.

Parameters
@return

Definition at line 596 of file class.ilAdvancedMDRecordGUI.php.

References $_POST, ilAdvancedMDRecord\saveObjRecSelection(), and ilUtil\stripSlashesArray().

Referenced by ilObjGlossaryGUI\saveProperties(), and ilObjWikiGUI\saveSettingsObject().

{
$sel = ilUtil::stripSlashesArray($_POST["amet_use_rec"]);
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
ilAdvancedMDRecord::saveObjRecSelection($this->obj_id, $this->sub_type, $sel);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::setInfoObject (   $info)

get info sections

public

Parameters
objectinstance of ilInfoScreenGUI

Definition at line 89 of file class.ilAdvancedMDRecordGUI.php.

Referenced by ilRemoteObjectBaseGUI\infoScreen(), ilObjCourseGUI\infoScreen(), and ilObjCategoryGUI\infoScreen().

{
$this->info = $info;
}

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::setRowData (   $a_val)

Set row data.

Parameters
array$a_valassoc array of row data (containing md record data)

Definition at line 628 of file class.ilAdvancedMDRecordGUI.php.

{
$this->row_data = $a_val;
}
ilAdvancedMDRecordGUI::setSearchFormValues ( array  $a_values)

Definition at line 354 of file class.ilAdvancedMDRecordGUI.php.

{
$this->search_form_values = $a_values;
}
ilAdvancedMDRecordGUI::setSearchValues (   $a_values)

Set values for search form.

public

Definition at line 76 of file class.ilAdvancedMDRecordGUI.php.

{
$this->search_values = $a_values;
}
ilAdvancedMDRecordGUI::setSelectedOnly (   $a_val)

Set selected only flag.

Parameters
boolean$a_valretrieve only records, that are selected by the object

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

Referenced by ilPresentationListTableGUI\__construct().

{
$this->selected_only = $a_val;
}

+ Here is the caller graph for this function:

ilAdvancedMDRecordGUI::setTableGUI (   $a_val)

Set table.

Parameters
object$a_valtable gui class

Definition at line 608 of file class.ilAdvancedMDRecordGUI.php.

{
$this->table_gui = $a_val;
}
ilAdvancedMDRecordGUI::showECSStart (   $def)
private

Show special form for ecs start.

private

Parameters
objectilAdvMDFieldDefinition

Definition at line 442 of file class.ilAdvancedMDRecordGUI.php.

References $ilUser, ilECSDataMappingSettings\_getInstance(), ilAdvancedMDFieldDefinition\getInstance(), IL_CAL_UNIX, parseDuration(), ilDurationInputGUI\setHours(), ilAdvancedMDFieldDefinition\TYPE_SELECT, and ilAdvancedMDFieldDefinition\TYPE_TEXT.

{
global $ilUser;
$this->lng->loadLanguageModule('ecs');
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDValue.php');
$value_start = ilAdvancedMDValue::_getInstance($this->obj_id,$def->getFieldId());
$unixtime = $value_start->getValue() ? $value_start->getValue() : mktime(8,0,0,date('m'),date('d'),date('Y'));
$time = new ilDateTimeInputGUI($this->lng->txt('ecs_event_appointment'),'md['.$def->getFieldId().']');
$time->setShowTime(true);
$time->setDate(new ilDateTime($unixtime,IL_CAL_UNIX));
$time->enableDateActivation($this->lng->txt('enabled'),
'md_activated['.$def->getFieldId().']',
$value_start->getValue() ? true : false);
$time->setDisabled($value_start->isDisabled());
if($field_id = $mapping->getMappingByECSName(0,'end'))
{
$value_end = ilAdvancedMDValue::_getInstance($this->obj_id,$field_id);
list($hours,$minutes) = $this->parseDuration($value_start->getValue(),$value_end->getValue());
$duration = new ilDurationInputGUI($this->lng->txt('ecs_duration'),'ecs_duration');
$duration->setHours($hours);
$duration->setMinutes($minutes);
#$duration->setInfo($this->lng->txt('ecs_duration_info'));
$duration->setShowHours(true);
$duration->setShowMinutes(true);
$time->addSubItem($duration);
}
if($field_id = $mapping->getMappingByECSName(0,'cycle'))
{
$value = ilAdvancedMDValue::_getInstance($this->obj_id,$field_id);
switch($cycle_def->getFieldType())
{
$text = new ilTextInputGUI($cycle_def->getTitle(),'md['.$cycle_def->getFieldId().']');
$text->setValue($value->getValue());
$text->setSize(20);
$text->setMaxLength(512);
$text->setDisabled($value->isDisabled());
$time->addSubItem($text);
break;
$select = new ilSelectInputGUI($cycle_def->getTitle(),'md['.$cycle_def->getFieldId().']');
$select->setOptions($cycle_def->getFieldValuesForSelect());
$select->setValue($value->getValue());
$select->setDisabled($value->isDisabled());
$time->addSubItem($select);
break;
}
}
if($field_id = $mapping->getMappingByECSName(0,'room'))
{
$value = ilAdvancedMDValue::_getInstance($this->obj_id,$field_id);
switch($room_def->getFieldType())
{
$text = new ilTextInputGUI($room_def->getTitle(),'md['.$room_def->getFieldId().']');
$text->setValue($value->getValue());
$text->setSize(20);
$text->setMaxLength(512);
$text->setDisabled($value->isDisabled());
$time->addSubItem($text);
break;
$select = new ilSelectInputGUI($room_def->getTitle(),'md['.$room_def->getFieldId().']');
$select->setOptions($cycle_def->getFieldValuesForSelect());
$select->setValue($value->getValue());
$select->setDisabled($value->isDisabled());
$time->addSubItem($select);
break;
}
}
$this->form->addItem($time);
}

+ Here is the call graph for this function:

ilAdvancedMDRecordGUI::writeEditForm ( )

Write edit form values to db.

Returns
bool

Definition at line 246 of file class.ilAdvancedMDRecordGUI.php.

Referenced by ilGlossaryTermGUI\updateTerm().

{
if(!sizeof($this->editor_form))
{
return false;
}
foreach($this->editor_form as $item)
{
$item["values"]->write();
}
return true;
}

+ Here is the caller graph for this function:

Field Documentation

ilAdvancedMDRecordGUI::$editor_form
protected

Definition at line 36 of file class.ilAdvancedMDRecordGUI.php.

ilAdvancedMDRecordGUI::$form
private

Definition at line 33 of file class.ilAdvancedMDRecordGUI.php.

Referenced by setPropertyForm().

ilAdvancedMDRecordGUI::$lng
protected

Definition at line 26 of file class.ilAdvancedMDRecordGUI.php.

Referenced by __construct().

ilAdvancedMDRecordGUI::$mode
private

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

ilAdvancedMDRecordGUI::$obj_id
private

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

ilAdvancedMDRecordGUI::$obj_type
private

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

ilAdvancedMDRecordGUI::$search_values = array()
private

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

ilAdvancedMDRecordGUI::$sub_type
private

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

const ilAdvancedMDRecordGUI::MODE_FILTER = 5
const ilAdvancedMDRecordGUI::MODE_INFO = 3
const ilAdvancedMDRecordGUI::MODE_SEARCH = 2
const ilAdvancedMDRecordGUI::MODE_TABLE_CELLS = 7

Definition at line 24 of file class.ilAdvancedMDRecordGUI.php.

const ilAdvancedMDRecordGUI::MODE_TABLE_HEAD = 6

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


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