ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups 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
 doUpdate ()
 delete ()
 getValue ()
 setValue ($value)
 getFormInput ()
 getPlainText ()
 getHTML ()
 getSingleHTML ($link=null)
 this funciton is used to in the viewdefinition of a single record.
 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

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

Reimplemented from ilDataCollectionRecordField.

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

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

{
parent::__construct($record, $field);
$dclTable = ilDataCollectionCache::getTableCache($this->getField()->getTableId());
$this->dcl_obj_id = $dclTable->getCollectionObject()->getId();
}

+ Here is the call graph for this function:

Member Function Documentation

ilDataCollectionILIASRefField::getExportValue ( )

Reimplemented from ilDataCollectionRecordField.

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

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

{
$value = $this->getValue();
return $link;
}

+ Here is the call graph for this function:

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

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

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

{
$value = $this->getValue();
// $link = ilLink::_getStaticLink($value);
if($options['link']['display']) {
$html = $this->getLinkHTML($options['link']['name']);
} else {
}
return $html;
}

+ Here is the call graph for this function:

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().

{
$value = $this->getValue();
if($link_name) {
$html = "<a href='".$link."'>".$link_name."</a>";
} else {
$html = "<a href='".$link."'>".ilObject::_lookupTitle($id)."</a>";
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

{
global $ilDB, $ilUser;
$usr_id = $ilUser->getId();
$obj_ref = $this->getValue();
$obj_id = ilObject2::_lookupObjectId($obj_ref);
$query = " SELECT status_changed, status
FROM ut_lp_marks
WHERE usr_id = ".$usr_id." AND obj_id = ".$obj_id."
";
$result = $ilDB->query($query);
return ($result->numRows() == 0)? false:$result->fetchRow(DB_FETCHMODE_OBJECT);
}

+ Here is the call graph for this function:

Field Documentation

ilDataCollectionILIASRefField::$dcl_obj_id
protected

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

ilDataCollectionILIASRefField::$rated
protected

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


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