5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
34 $this->ctrl = $DIC->ctrl();
35 $this->lng = $DIC->language();
38 $this->record = $a_record;
39 $this->callback = $a_decorator_callback;
41 $this->
setTitle($this->record->getTitle());
42 $this->
setBlockId(
"advmd_" . $this->record->getRecordId());
44 $this->allow_moving =
false;
52 return self::$block_type;
73 $this->values = $a_values;
83 $next_class =
$ilCtrl->getNextClass();
84 $cmd =
$ilCtrl->getCmd(
"getHTML");
86 switch ($next_class) {
112 $btpl =
new ilTemplate(
"tpl.advmd_block.html",
true,
true,
"Services/Object");
119 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
120 include_once(
'Services/ADT/classes/class.ilADTFactory.php');
123 $this->values->read();
125 $defs = $this->values->getDefinitions();
126 foreach ($this->values->getADTGroup()->getElements() as $element_id => $element) {
127 $btpl->setCurrentBlock(
"item");
128 $btpl->setVariable(
"CAPTION", $defs[$element_id]->
getTitle());
129 if ($element->isNull()) {
135 $value->setSize(
"100%",
"200px");
138 if (in_array($element->getType(), array(
"MultiEnum",
"Enum",
"Text"))) {
139 $value->setDecoratorCallBack($this->callback);
142 $value = $value->getHTML();
144 $btpl->setVariable(
"VALUE", $value);
145 $btpl->parseCurrentBlock();
148 $html = $btpl->get();
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.
__construct(Container $dic, ilPlugin $plugin)
This class represents a block method of a block.