ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
arDisplayGUI Class Reference

GUI-Class arDisplayGUI. More...

+ Collaboration diagram for arDisplayGUI:

Public Member Functions

 getHtml ()
 setBackButtonName ($back_button_name)
 getBackButtonName ()
 setBackButtonTarget ($back_button_target)
 getBackButtonTarget ()
 setFields (arDisplayFields $fields)
 getFields ()
 getFieldsAsArray ()
 getField ($field_name)
 addField (arDisplayField $field)
 setTitle ($title)
 getTitle ()
 setTemplate ($template)
 getTemplate ()

Protected Member Functions

 init ()
 initTitle ()
 initFields ()
 customizeFields ()
 initBackButton ()
 initTemplate ()
 setArFieldData (arDisplayField $field, $value)
 setEmptyFieldData (arDisplayField $field)
 setCustomFieldData (arDisplayField $field)
 setModifiedByData (arDisplayField $field, $value)
 setCreatedByData (arDisplayField $field, $value)
 setNumericData (arDisplayField $field, $value)
 setTextData (arDisplayField $field, $value)
 setDateTimeData (arDisplayField $field, $value)
 setClobData (arDisplayField $field, $value)
 txt ($txt, $plugin_txt=true)

Protected Attributes

 $record
 $parent_gui
 $ctrl
 $tpl
 $title = ""
 $fields = array()
 $data = array()
 $back_button_name = ""
 $back_button_target = ""
 $template

Detailed Description

GUI-Class arDisplayGUI.

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
2.0.7

Definition at line 13 of file class.arDisplayGUI.php.

Member Function Documentation

arDisplayGUI::addField ( arDisplayField  $field)
Parameters
arDisplayField

Definition at line 344 of file class.arDisplayGUI.php.

References getFields().

{
$this->getFields()->addField($field);
}

+ Here is the call graph for this function:

arDisplayGUI::customizeFields ( )
protected

Definition at line 98 of file class.arDisplayGUI.php.

Referenced by initFields().

{
}

+ Here is the caller graph for this function:

arDisplayGUI::getBackButtonName ( )
Returns
string

Definition at line 286 of file class.arDisplayGUI.php.

References $back_button_name.

Referenced by getHtml().

+ Here is the caller graph for this function:

arDisplayGUI::getBackButtonTarget ( )
Returns
string

Definition at line 302 of file class.arDisplayGUI.php.

References $back_button_target.

Referenced by getHtml().

+ Here is the caller graph for this function:

arDisplayGUI::getField (   $field_name)
Parameters
$field_name
Returns
arDisplayField

Definition at line 336 of file class.arDisplayGUI.php.

References getFields().

{
return $this->getFields()->getField($field_name);
}

+ Here is the call graph for this function:

arDisplayGUI::getFields ( )
Returns
arDisplayFields

Definition at line 318 of file class.arDisplayGUI.php.

References $fields.

Referenced by addField(), getField(), and getFieldsAsArray().

{
return $this->fields;
}

+ Here is the caller graph for this function:

arDisplayGUI::getFieldsAsArray ( )
Returns
arDisplayField []

Definition at line 326 of file class.arDisplayGUI.php.

References getFields().

{
return $this->getFields()->getFields();
}

+ Here is the call graph for this function:

arDisplayGUI::getHtml ( )
Returns
string

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

References getBackButtonName(), getBackButtonTarget(), and getTemplate().

{
$this->getTemplate()->setVariable("TITLE", $this->title);
$this->setArFieldsData();
$this->getTemplate()->setVariable("BACK_BUTTON_NAME", $this->getBackButtonName());
$this->getTemplate()->setVariable("BACK_BUTTON_TARGET", $this->getBackButtonTarget());
return $this->getTemplate()->get();
}

+ Here is the call graph for this function:

arDisplayGUI::getTemplate ( )
Returns

Definition at line 376 of file class.arDisplayGUI.php.

References $template.

Referenced by getHtml().

{
}

+ Here is the caller graph for this function:

arDisplayGUI::getTitle ( )
Returns
string

Definition at line 360 of file class.arDisplayGUI.php.

References $title.

{
return $this->title;
}
arDisplayGUI::init ( )
protected

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

References initBackButton(), initFields(), initTemplate(), and initTitle().

{
$this->initTitle();
$this->initFields();
$this->initBackButton();
$this->initTemplate();
}

+ Here is the call graph for this function:

arDisplayGUI::initBackButton ( )
protected

Definition at line 102 of file class.arDisplayGUI.php.

References setBackButtonName(), setBackButtonTarget(), and txt().

Referenced by init().

{
$this->setBackButtonName($this->txt("back", false));
$this->setBackButtonTarget($this->ctrl->getLinkTarget($this->parent_gui, "index"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arDisplayGUI::initFields ( )
protected

Definition at line 91 of file class.arDisplayGUI.php.

References customizeFields(), and fields.

Referenced by init().

{
$this->fields = new arDisplayFields($this->ar);
$this->customizeFields();
$this->fields->sortFields();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arDisplayGUI::initTemplate ( )
protected

Definition at line 108 of file class.arDisplayGUI.php.

References setTemplate().

Referenced by init().

{
$this->setTemplate(new ilTemplate("tpl.display.html", true, true, "Customizing/global/plugins/Libraries/ActiveRecord"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arDisplayGUI::initTitle ( )
protected

Definition at line 86 of file class.arDisplayGUI.php.

References setTitle().

Referenced by init().

{
$this->setTitle(strtolower(str_replace("Record", "", get_class($this->ar))));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arDisplayGUI::setArFieldData ( arDisplayField  $field,
  $value 
)
protected
Parameters
arDisplayField$field
$value
Returns
null|string

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

References arViewField\getCustomField(), arField\getFieldType(), arViewField\getIsCreatedByField(), arViewField\getIsModifiedByField(), setClobData(), setCreatedByData(), setCustomFieldData(), setDateTimeData(), setEmptyFieldData(), setModifiedByData(), setNumericData(), and setTextData().

{
if ($field->getCustomField()) {
return $this->setCustomFieldData($field);
} else {
if ($value == NULL) {
return $this->setEmptyFieldData($field);
} else {
if ($field->getIsCreatedByField()) {
return $this->setCreatedByData($field, $value);
} else {
if ($field->getIsModifiedByField()) {
return $this->setModifiedByData($field, $value);
} else {
switch ($field->getFieldType()) {
case 'integer':
case 'float':
return $this->setNumericData($field, $value);
case 'text':
return $this->setTextData($field, $value);
case 'date':
case 'time':
case 'timestamp':
return $this->setDateTimeData($field, $value);
case 'clob':
return $this->setClobData($field, $value);
}
}
}
}
}
}

+ Here is the call graph for this function:

arDisplayGUI::setBackButtonName (   $back_button_name)
Parameters
string$back_button_name

Definition at line 278 of file class.arDisplayGUI.php.

References $back_button_name.

Referenced by initBackButton().

{
$this->back_button_name = $back_button_name;
}

+ Here is the caller graph for this function:

arDisplayGUI::setBackButtonTarget (   $back_button_target)
Parameters
$back_button_target

Definition at line 294 of file class.arDisplayGUI.php.

References $back_button_target.

Referenced by initBackButton().

{
$this->back_button_target = $back_button_target;
}

+ Here is the caller graph for this function:

arDisplayGUI::setClobData ( arDisplayField  $field,
  $value 
)
protected
Parameters
arDisplayField$field
$value
Returns
mixed

Definition at line 270 of file class.arDisplayGUI.php.

Referenced by setArFieldData().

{
return $value;
}

+ Here is the caller graph for this function:

arDisplayGUI::setCreatedByData ( arDisplayField  $field,
  $value 
)
protected
Parameters
arDisplayField$field
$value
Returns
string

Definition at line 222 of file class.arDisplayGUI.php.

Referenced by setArFieldData().

{
$user = new ilObjUser($value);
return $user->getPublicName();
}

+ Here is the caller graph for this function:

arDisplayGUI::setCustomFieldData ( arDisplayField  $field)
protected
Parameters
arDisplayField$field
Returns
string

Definition at line 198 of file class.arDisplayGUI.php.

Referenced by setArFieldData().

{
return "CUSTOM-OVERRIDE: setCustomFieldData";
}

+ Here is the caller graph for this function:

arDisplayGUI::setDateTimeData ( arDisplayField  $field,
  $value 
)
protected
Parameters
arDisplayField$field
$value
Returns
string

Definition at line 257 of file class.arDisplayGUI.php.

References ilDatePresentation\formatDate(), and IL_CAL_DATETIME.

Referenced by setArFieldData().

{
$datetime = new ilDateTime($value, IL_CAL_DATETIME);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arDisplayGUI::setEmptyFieldData ( arDisplayField  $field)
protected
Parameters
arDisplayField$field
Returns
string

Definition at line 188 of file class.arDisplayGUI.php.

References txt().

Referenced by setArFieldData().

{
return $this->txt("", false);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arDisplayGUI::setFields ( arDisplayFields  $fields)
Parameters
arDisplayFields$fields

Definition at line 310 of file class.arDisplayGUI.php.

References $fields, and fields.

{
$this->fields = $fields;
}
arDisplayGUI::setModifiedByData ( arDisplayField  $field,
  $value 
)
protected
Parameters
arDisplayField$field
$value
Returns
string

Definition at line 209 of file class.arDisplayGUI.php.

Referenced by setArFieldData().

{
$user = new ilObjUser($value);
return $user->getPublicName();
}

+ Here is the caller graph for this function:

arDisplayGUI::setNumericData ( arDisplayField  $field,
  $value 
)
protected
Parameters
arDisplayField$field
$value
Returns
mixed

Definition at line 235 of file class.arDisplayGUI.php.

Referenced by setArFieldData().

{
return $value;
}

+ Here is the caller graph for this function:

arDisplayGUI::setTemplate (   $template)
Parameters
\ilTemplate$template

Definition at line 368 of file class.arDisplayGUI.php.

References $template.

Referenced by initTemplate().

{
$this->template = $template;
}

+ Here is the caller graph for this function:

arDisplayGUI::setTextData ( arDisplayField  $field,
  $value 
)
protected
Parameters
arDisplayField$field
$value
Returns
mixed

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

Referenced by setArFieldData().

{
return $value;
}

+ Here is the caller graph for this function:

arDisplayGUI::setTitle (   $title)
Parameters
string$title

Definition at line 352 of file class.arDisplayGUI.php.

References $title.

Referenced by initTitle().

{
$this->title = $title;
}

+ Here is the caller graph for this function:

arDisplayGUI::txt (   $txt,
  $plugin_txt = true 
)
protected
Parameters
$txt
bool$plugin_txt
Returns
string

Definition at line 387 of file class.arDisplayGUI.php.

References $txt.

Referenced by initBackButton(), and setEmptyFieldData().

{
return $this->parent_gui->txt($txt, $plugin_txt);
}

+ Here is the caller graph for this function:

Field Documentation

arDisplayGUI::$back_button_name = ""
protected

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

Referenced by getBackButtonName(), and setBackButtonName().

arDisplayGUI::$back_button_target = ""
protected

Definition at line 50 of file class.arDisplayGUI.php.

Referenced by getBackButtonTarget(), and setBackButtonTarget().

arDisplayGUI::$ctrl
protected

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

arDisplayGUI::$data = array()
protected

Definition at line 42 of file class.arDisplayGUI.php.

arDisplayGUI::$fields = array()
protected

Definition at line 38 of file class.arDisplayGUI.php.

Referenced by getFields(), and setFields().

arDisplayGUI::$parent_gui
protected

Definition at line 22 of file class.arDisplayGUI.php.

arDisplayGUI::$record
protected

Definition at line 18 of file class.arDisplayGUI.php.

arDisplayGUI::$template
protected

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

Referenced by getTemplate(), and setTemplate().

arDisplayGUI::$title = ""
protected

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

Referenced by getTitle(), and setTitle().

arDisplayGUI::$tpl
protected

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


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