5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
40 $this->record = $a_record;
42 $this->
setTitle($this->record->getTitle());
43 $this->
setBlockId(
"advmdwiki_".$this->record->getRecordId());
46 $this->allow_moving =
false;
48 $lng->loadLanguageModule(
"wiki");
58 return self::$block_type;
79 public function setObject($a_wiki_ref_id, $a_wiki_obj_id, $a_page_id)
81 $this->ref_id = $a_wiki_ref_id;
82 $this->obj_id = $a_wiki_obj_id;
83 $this->page_id = $a_page_id;
93 $next_class = $ilCtrl->getNextClass();
94 $cmd = $ilCtrl->getCmd(
"getHTML");
110 $this->export = $a_export;
112 $has_write = $ilAccess->checkAccess(
"write",
"", $this->ref_id);
116 #16029 - hide completely 120 if (!$this->export && $has_write)
123 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"editAdvancedMetaData"),
124 $lng->txt(
"edit"),
"_top");
129 $ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"hideAdvancedMetaData"),
130 $lng->txt(
"hide"),
"_top");
142 return parent::getHTML();
152 if($this->adv_md_hidden === null)
166 $btpl =
new ilTemplate(
"tpl.wiki_advmd_block.html",
true,
true,
"Modules/Wiki");
173 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
174 include_once(
'Services/ADT/classes/class.ilADTFactory.php');
181 $defs = $values->getDefinitions();
182 foreach($values->getADTGroup()->getElements() as $element_id => $element)
184 $btpl->setCurrentBlock(
"item");
185 $btpl->setVariable(
"CAPTION", $defs[$element_id]->
getTitle());
186 if($element->isNull())
196 $value->setSize(
"100%",
"200px");
199 $value = $value->getHTML();
201 $btpl->setVariable(
"VALUE", $value);
202 $btpl->parseCurrentBlock();
223 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
231 return (
bool)
sizeof(self::getRecords($a_wiki_obj_id));
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
addBlockCommand($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
Add Block Command.
static setUseRelativeDates($a_status)
set use relative dates
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
static getInstance()
Get singleton.
static lookupAdvancedMetadataHidden($a_page_id)
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
static _getSelectedRecordsByObject($a_obj_type, $a_obj_id, $a_sub_type="")
Get selected records by object.
This class represents a block method of a block.