5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
32 parent::__construct();
34 $this->record = $a_record;
35 $this->callback = $a_decorator_callback;
37 $this->
setTitle($this->record->getTitle());
38 $this->
setBlockId(
"advmd_".$this->record->getRecordId());
41 $this->allow_moving =
false;
51 return self::$block_type;
74 $this->values = $a_values;
84 $next_class = $ilCtrl->getNextClass();
85 $cmd = $ilCtrl->getCmd(
"getHTML");
101 $btpl =
new ilTemplate(
"tpl.advmd_block.html",
true,
true,
"Services/Object");
108 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
109 include_once(
'Services/ADT/classes/class.ilADTFactory.php');
112 $this->values->read();
114 $defs = $this->values->getDefinitions();
115 foreach($this->values->getADTGroup()->getElements() as $element_id => $element)
117 $btpl->setCurrentBlock(
"item");
118 $btpl->setVariable(
"CAPTION", $defs[$element_id]->
getTitle());
119 if($element->isNull())
129 $value->setSize(
"100%",
"200px");
132 if(in_array($element->getType(),
array(
"MultiEnum",
"Enum",
"Text")))
134 $value->setDecoratorCallBack($this->callback);
137 $value = $value->getHTML();
139 $btpl->setVariable(
"VALUE", $value);
140 $btpl->parseCurrentBlock();
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
static setUseRelativeDates($a_status)
set use relative dates
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
static getInstance()
Get singleton.
static useRelativeDates()
check if relative dates are used
setTitle($a_title)
Set Title.
setBlockId($a_block_id=0)
Set Block Id.
special template class to simplify handling of ITX/PEAR
Create styles array
The data for the language used.
This class represents a block method of a block.