5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
34 $this->ctrl = $DIC->ctrl();
35 $this->lng = $DIC->language();
36 parent::__construct();
38 $this->record = $a_record;
39 $this->callback = $a_decorator_callback;
41 $this->
setTitle($this->record->getTitle());
42 $this->
setBlockId(
"advmd_" . $this->record->getRecordId());
45 $this->allow_moving =
false;
55 return self::$block_type;
78 $this->values = $a_values;
88 $next_class =
$ilCtrl->getNextClass();
89 $cmd =
$ilCtrl->getCmd(
"getHTML");
91 switch ($next_class) {
104 $btpl =
new ilTemplate(
"tpl.advmd_block.html",
true,
true,
"Services/Object");
111 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
112 include_once(
'Services/ADT/classes/class.ilADTFactory.php');
115 $this->values->read();
117 $defs = $this->values->getDefinitions();
118 foreach ($this->values->getADTGroup()->getElements() as $element_id => $element) {
119 $btpl->setCurrentBlock(
"item");
120 $btpl->setVariable(
"CAPTION", $defs[$element_id]->
getTitle());
121 if ($element->isNull()) {
127 $value->setSize(
"100%",
"200px");
130 if (in_array($element->getType(),
array(
"MultiEnum",
"Enum",
"Text"))) {
131 $value->setDecoratorCallBack($this->callback);
134 $value = $value->getHTML();
136 $btpl->setVariable(
"VALUE", $value);
137 $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.