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;
53 return self::$block_type;
74 $this->values = $a_values;
84 $next_class =
$ilCtrl->getNextClass();
85 $cmd =
$ilCtrl->getCmd(
"getHTML");
87 switch ($next_class) {
100 $btpl =
new ilTemplate(
"tpl.advmd_block.html",
true,
true,
"Services/Object");
107 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
108 include_once(
'Services/ADT/classes/class.ilADTFactory.php');
111 $this->values->read();
113 $defs = $this->values->getDefinitions();
114 foreach ($this->values->getADTGroup()->getElements() as $element_id => $element) {
115 $btpl->setCurrentBlock(
"item");
116 $btpl->setVariable(
"CAPTION", $defs[$element_id]->
getTitle());
117 if ($element->isNull()) {
123 $value->setSize(
"100%",
"200px");
126 if (in_array($element->getType(), array(
"MultiEnum",
"Enum",
"Text"))) {
127 $value->setDecoratorCallBack($this->callback);
130 $value = $value->getHTML();
132 $btpl->setVariable(
"VALUE", $value);
133 $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
This class represents a block method of a block.