ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDataCollectionILIASRefField Class Reference

Class ilDataCollectionField. More...

+ Inheritance diagram for ilDataCollectionILIASRefField:
+ Collaboration diagram for ilDataCollectionILIASRefField:

Public Member Functions

 __construct (ilDataCollectionRecord $record, ilDataCollectionField $field)
 
 getHTML (array $options=array())
 
 getLinkHTML ($link_name=NULL)
 
 getExportValue ()
 
 getStatus ()
 
- Public Member Functions inherited from ilDataCollectionRecordField
 __construct (ilDataCollectionRecord $record, ilDataCollectionField $field)
 
 doUpdate ()
 
 delete ()
 
 getValue ()
 
 setValue ($value)
 
 getFormInput ()
 
 getExportValue ()
 
 getPlainText ()
 
 getHTML ()
 
 getSingleHTML ($link=null)
 this funciton is used to in the viewdefinition of a single record. More...
 
 getField ()
 
 getId ()
 
 getRecord ()
 

Protected Attributes

 $rated
 
 $dcl_obj_id
 
- Protected Attributes inherited from ilDataCollectionRecordField
 $id
 
 $field
 
 $record
 
 $value
 

Additional Inherited Members

- Protected Member Functions inherited from ilDataCollectionRecordField
 loadValue ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDataCollectionILIASRefField::__construct ( ilDataCollectionRecord  $record,
ilDataCollectionField  $field 
)

Definition at line 32 of file class.ilDataCollectionILIASRefField.php.

References ilDataCollectionRecordField\getField(), and ilDataCollectionCache\getTableCache().

32  {
33  parent::__construct($record, $field);
34  $dclTable = ilDataCollectionCache::getTableCache($this->getField()->getTableId());
35  $this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
36  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getExportValue()

ilDataCollectionILIASRefField::getExportValue ( )

Definition at line 79 of file class.ilDataCollectionILIASRefField.php.

References ilDataCollectionRecordField\$value, ilLink\_getStaticLink(), and ilDataCollectionRecordField\getValue().

79  {
80  $value = $this->getValue();
82  return $link;
83  }
+ Here is the call graph for this function:

◆ getHTML()

ilDataCollectionILIASRefField::getHTML ( array  $options = array())

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

References ilDataCollectionRecordField\$id, $options, ilDataCollectionRecordField\$value, ilObject\_lookupObjId(), ilObject\_lookupTitle(), getLinkHTML(), and ilDataCollectionRecordField\getValue().

45  {
46  $value = $this->getValue();
47 // $link = ilLink::_getStaticLink($value);
49 
50 
51  if($options['link']['display']) {
52  $html = $this->getLinkHTML($options['link']['name']);
53  } else {
54  $html = ilObject::_lookupTitle($id);
55  }
56 
57  return $html;
58  }
static _lookupTitle($a_id)
lookup object title
if(!is_array($argv)) $options
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ getLinkHTML()

ilDataCollectionILIASRefField::getLinkHTML (   $link_name = NULL)

Definition at line 65 of file class.ilDataCollectionILIASRefField.php.

References ilDataCollectionRecordField\$id, ilDataCollectionRecordField\$value, ilLink\_getStaticLink(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilDataCollectionRecordField\getValue().

Referenced by getHTML().

65  {
66  $value = $this->getValue();
69 
70  if($link_name) {
71  $html = "<a href='".$link."'>".$link_name."</a>";
72  } else {
73  $html = "<a href='".$link."'>".ilObject::_lookupTitle($id)."</a>";
74  }
75 
76  return $html;
77  }
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStatus()

ilDataCollectionILIASRefField::getStatus ( )

Definition at line 85 of file class.ilDataCollectionILIASRefField.php.

References $ilUser, $query, $result, $usr_id, ilObject2\_lookupObjectId(), DB_FETCHMODE_OBJECT, and ilDataCollectionRecordField\getValue().

85  {
86  global $ilDB, $ilUser;
87  $usr_id = $ilUser->getId();
88  $obj_ref = $this->getValue();
89  $obj_id = ilObject2::_lookupObjectId($obj_ref);
90  $query = " SELECT status_changed, status
91  FROM ut_lp_marks
92  WHERE usr_id = ".$usr_id." AND obj_id = ".$obj_id."
93 ";
94  $result = $ilDB->query($query);
95  return ($result->numRows() == 0)? false:$result->fetchRow(DB_FETCHMODE_OBJECT);
96  }
$result
static _lookupObjectId($a_ref_id)
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

Field Documentation

◆ $dcl_obj_id

ilDataCollectionILIASRefField::$dcl_obj_id
protected

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

◆ $rated

ilDataCollectionILIASRefField::$rated
protected

Definition at line 25 of file class.ilDataCollectionILIASRefField.php.


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