ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilWikiAdvMetaDataBlockGUI Class Reference

Advanced metadata wiki block. More...

+ Inheritance diagram for ilWikiAdvMetaDataBlockGUI:
+ Collaboration diagram for ilWikiAdvMetaDataBlockGUI:

Public Member Functions

 __construct (ilAdvancedMDRecord $a_record)
 Constructor.
 setObject ($a_wiki_ref_id, $a_wiki_obj_id, $a_page_id)
executeCommand ()
 execute command
 getHTML ($a_export=false)
 Get block HTML code.
 fillDataSection ()
 Fill data section.
- Public Member Functions inherited from ilBlockGUI
 ilBlockGUI ()
 Constructor.
 addHeaderLink ($a_href, $a_text, $status=true)
 getHeaderLinks ()
 setData ($a_data)
 Set Data.
 getData ()
 Get Data.
 setBigMode ($a_bigmode)
 Set Big Mode.
 getBigMode ()
 Get Big Mode.
 setBlockId ($a_block_id=0)
 Set Block Id.
 getBlockId ()
 Get Block Id.
 setAvailableDetailLevels ($a_max, $a_min=0)
 Set Available Detail Levels.
 setCurrentDetailLevel ($a_currentdetaillevel)
 Set Current Detail Level.
 setGuiObject (&$a_gui_object)
 Set GuiObject.
 getGuiObject ()
 Get GuiObject.
 getCurrentDetailLevel ()
 Get Current Detail Level.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setImage ($a_image)
 Set Image.
 getImage ()
 Get Image.
 setOffset ($a_offset)
 Set Offset.
 getOffset ()
 Get Offset.
 correctOffset ()
 setLimit ($a_limit)
 Set Limit.
 getLimit ()
 Get Limit.
 setEnableEdit ($a_enableedit)
 Set EnableEdit.
 getEnableEdit ()
 Get EnableEdit.
 setRepositoryMode ($a_repositorymode)
 Set RepositoryMode.
 getRepositoryMode ()
 Get RepositoryMode.
 setFooterInfo ($a_footerinfo, $a_hide_and_icon=false)
 Set Footer Info.
 getFooterInfo ($a_hide_and_icon=false)
 Get Footer Info.
 setSubtitle ($a_subtitle)
 Set Subtitle.
 getSubtitle ()
 Get Subtitle.
 setRefId ($a_refid)
 Set Ref Id (only used if isRepositoryObject() is true).
 getRefId ()
 Get Ref Id (only used if isRepositoryObject() is true).
 setAdminCommands ($a_admincommands)
 Set Administration Commmands.
 getAdminCommands ()
 Get Administration Commmands.
 setColSpan ($a_colspan)
 Set Columns Span.
 getColSpan ()
 Get Columns Span.
 setEnableDetailRow ($a_enabledetailrow)
 Set EnableDetailRow.
 getEnableDetailRow ()
 Get EnableDetailRow.
 setEnableNumInfo ($a_enablenuminfo)
 Set Enable Item Number Info.
 getEnableNumInfo ()
 Get Enable Item Number Info.
 setProperties ($a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties.
 getProperty ($a_property)
 setProperty ($a_property, $a_value)
 setRowTemplate ($a_rowtemplatename, $a_rowtemplatedir="")
 Set Row Template Name.
 getNavParameter ()
 getDetailParameter ()
 getConfigParameter ()
 getMoveParameter ()
 getRowTemplateName ()
 Get Row Template Name.
 getRowTemplateDir ()
 Get Row Template Directory.
 addBlockCommand ($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
 Add Block Command.
 getBlockCommands ()
 Get Block commands.
 addHeaderCommand ($a_href, $a_text, $a_as_close=false)
 Add Header Block Command.
 getHeaderCommands ()
 Get Header Block commands.
 addFooterLink ($a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false, $a_checked=false)
 Add a footer text/link.
 getFooterLinks ()
 Get footer links.
 clearFooterLinks ()
 Clear footer links.
 handleDetailLevel ()
 Handle read/write current detail level.
 getHTML ()
 Handle config status.
 fillHeaderCommands ()
 Fill header commands block.
 fillHeaderTitleBlock ()
 Fill header title block (title and.
 setDataSection ($a_content)
 Call this from overwritten fillDataSection(), if standard row based data is not used.
 fillRow ($a_set)
 fillFooter ()
 fillPreviousNext ()
 Fill previous/next row.
 setPreviousNextLinks ()
 Get previous/next linkbar.
 fillFooterLinks ($a_top=false, $a_numinfo="")
 Fill footer links.
 fillDetailRow ()
 Fill Detail Setting Row.

Static Public Member Functions

static getBlockType ()
 Get block type.
static isRepositoryObject ()
 Is this a repository object.
static getScreenMode ()
 Get Screen Mode for current command.
static getRecords ($a_wiki_obj_id)
static isActive ($a_wiki_obj_id)

Static Public Attributes

static $block_type = "wikiadvmd"
static $st_data

Protected Member Functions

 isHidden ()
 Is block currently hidden?
- Protected Member Functions inherited from ilBlockGUI
 fillRowColor ($a_placeholder="CSS_ROW")
 preloadData (array $data)
 Can be overwritten in subclasses.

Protected Attributes

 $export = false
 $obj_id
 $ref_id
 $page_id
 $record
 $adv_md_hidden
- Protected Attributes inherited from ilBlockGUI
 $data = array()
 $colspan = 1
 $enablenuminfo = true
 $detail_min = 0
 $detail_max = 0
 $bigmode = false
 $footer_links = array()
 $block_id = 0
 $header_commands = array()
 $allow_moving = true
 $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 $enabledetailrow = true
 $header_links = array()
 $footerinfo = false
 $footerinfo_icon = false
 $block_commands = array()
 $max_count = false
 $close_command = false
 $image = false
 $property = false
 $nav_value = ""
 $css_row = ""
 $dropdown

Static Protected Attributes

static $records = array()

Detailed Description

Advanced metadata wiki block.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

ilWikiAdvMetaDataBlockGUI: ilColumnGUI

Definition at line 17 of file class.ilWikiAdvMetaDataBlockGUI.php.

Constructor & Destructor Documentation

ilWikiAdvMetaDataBlockGUI::__construct ( ilAdvancedMDRecord  $a_record)

Constructor.

Definition at line 34 of file class.ilWikiAdvMetaDataBlockGUI.php.

References $ilCtrl, $lng, ilBlockGUI\ilBlockGUI(), ilBlockGUI\setBlockId(), ilBlockGUI\setEnableNumInfo(), and ilBlockGUI\setTitle().

{
global $ilCtrl, $lng;
$this->record = $a_record;
$this->setTitle($this->record->getTitle());
$this->setBlockId("advmdwiki_".$this->record->getRecordId());
$this->setEnableNumInfo(false);
// $this->setAvailableDetailLevels(3);
$this->allow_moving = false;
$lng->loadLanguageModule("wiki");
}

+ Here is the call graph for this function:

Member Function Documentation

& ilWikiAdvMetaDataBlockGUI::executeCommand ( )

execute command

Definition at line 89 of file class.ilWikiAdvMetaDataBlockGUI.php.

References $cmd, and $ilCtrl.

{
global $ilCtrl;
$next_class = $ilCtrl->getNextClass();
$cmd = $ilCtrl->getCmd("getHTML");
switch ($next_class)
{
default:
return $this->$cmd();
}
}
ilWikiAdvMetaDataBlockGUI::fillDataSection ( )

Fill data section.

Reimplemented from ilBlockGUI.

Definition at line 162 of file class.ilWikiAdvMetaDataBlockGUI.php.

References $lng, $obj_id, $page_id, ilADTFactory\getInstance(), ilBlockGUI\getTitle(), ilAdvancedMDValues\read(), ilBlockGUI\setDataSection(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

{
global $lng;
$btpl = new ilTemplate("tpl.wiki_advmd_block.html", true, true, "Modules/Wiki");
// see ilAdvancedMDRecordGUI::parseInfoPage()
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
include_once('Services/ADT/classes/class.ilADTFactory.php');
$values = new ilAdvancedMDValues($this->record->getRecordId(), $this->obj_id, "wpg", $this->page_id);
// this correctly binds group and definitions
$values->read();
$defs = $values->getDefinitions();
foreach($values->getADTGroup()->getElements() as $element_id => $element)
{
$btpl->setCurrentBlock("item");
$btpl->setVariable("CAPTION", $defs[$element_id]->getTitle());
if($element->isNull())
{
$value = "-";
}
else
{
$value = ilADTFactory::getInstance()->getPresentationBridgeForInstance($element);
if($element instanceof ilADTLocation)
{
$value->setSize("100%", "200px");
}
$value = $value->getHTML();
}
$btpl->setVariable("VALUE", $value);
$btpl->parseCurrentBlock();
}
/*
if ($this->isHidden())
{
$btpl->setVariable("HIDDEN_INFO", $lng->txt("wiki_adv_md_hidden"));
}
*/
$this->setDataSection($btpl->get());
return;
}

+ Here is the call graph for this function:

static ilWikiAdvMetaDataBlockGUI::getBlockType ( )
static

Get block type.

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 56 of file class.ilWikiAdvMetaDataBlockGUI.php.

References $block_type.

{
}
ilWikiAdvMetaDataBlockGUI::getHTML (   $a_export = false)

Get block HTML code.

Definition at line 106 of file class.ilWikiAdvMetaDataBlockGUI.php.

References $ilCtrl, $lng, ilBlockGUI\addBlockCommand(), ilBlockGUI\getHTML(), and isHidden().

{
global $ilCtrl, $lng, $ilAccess;
$this->export = $a_export;
$has_write = $ilAccess->checkAccess("write", "", $this->ref_id);
if ($this->isHidden())
{
#16029 - hide completely
return;
}
if (!$this->export && $has_write)
{
$ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
$lng->txt("edit"), "_top");
if (!$this->isHidden())
{
$ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData"),
$lng->txt("hide"), "_top");
}
/* #16029 - moved to page actions
else
{
$this->addBlockCommand(
$ilCtrl->getLinkTargetByClass("ilwikipagegui", "unhideAdvancedMetaData"),
$lng->txt("show"), "_top");
}
*/
}
return parent::getHTML();
}

+ Here is the call graph for this function:

static ilWikiAdvMetaDataBlockGUI::getRecords (   $a_wiki_obj_id)
static

Definition at line 219 of file class.ilWikiAdvMetaDataBlockGUI.php.

References $records, and ilAdvancedMDRecord\_getSelectedRecordsByObject().

Referenced by isActive(), and ilObjWikiGUI\renderSideBlock().

{
if(!array_key_exists($a_wiki_obj_id, self::$records))
{
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
self::$records[$a_wiki_obj_id] = ilAdvancedMDRecord::_getSelectedRecordsByObject("wiki", $a_wiki_obj_id, "wpg");
}
return self::$records[$a_wiki_obj_id];
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilWikiAdvMetaDataBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Reimplemented from ilBlockGUI.

Definition at line 74 of file class.ilWikiAdvMetaDataBlockGUI.php.

References IL_SCREEN_SIDE.

{
}
static ilWikiAdvMetaDataBlockGUI::isActive (   $a_wiki_obj_id)
static

Definition at line 229 of file class.ilWikiAdvMetaDataBlockGUI.php.

References getRecords().

Referenced by ilWikiFunctionsBlockGUI\fillDataSection(), and ilObjWikiGUI\renderSideBlock().

{
return (bool)sizeof(self::getRecords($a_wiki_obj_id));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilWikiAdvMetaDataBlockGUI::isHidden ( )
protected

Is block currently hidden?

Returns
boolean

Definition at line 150 of file class.ilWikiAdvMetaDataBlockGUI.php.

References $adv_md_hidden, and ilWikiPage\lookupAdvancedMetadataHidden().

Referenced by getHTML().

{
if($this->adv_md_hidden === null)
{
$this->adv_md_hidden = ilWikiPage::lookupAdvancedMetadataHidden($this->page_id);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilWikiAdvMetaDataBlockGUI::isRepositoryObject ( )
static

Is this a repository object.

Returns
string Block type.

Reimplemented from ilBlockGUI.

Definition at line 66 of file class.ilWikiAdvMetaDataBlockGUI.php.

{
return false;
}
ilWikiAdvMetaDataBlockGUI::setObject (   $a_wiki_ref_id,
  $a_wiki_obj_id,
  $a_page_id 
)

Definition at line 79 of file class.ilWikiAdvMetaDataBlockGUI.php.

{
$this->ref_id = $a_wiki_ref_id;
$this->obj_id = $a_wiki_obj_id;
$this->page_id = $a_page_id;
}

Field Documentation

ilWikiAdvMetaDataBlockGUI::$adv_md_hidden
protected

Definition at line 27 of file class.ilWikiAdvMetaDataBlockGUI.php.

Referenced by isHidden().

ilWikiAdvMetaDataBlockGUI::$block_type = "wikiadvmd"
static

Definition at line 19 of file class.ilWikiAdvMetaDataBlockGUI.php.

Referenced by getBlockType().

ilWikiAdvMetaDataBlockGUI::$export = false
protected

Definition at line 22 of file class.ilWikiAdvMetaDataBlockGUI.php.

ilWikiAdvMetaDataBlockGUI::$obj_id
protected

Definition at line 23 of file class.ilWikiAdvMetaDataBlockGUI.php.

Referenced by fillDataSection().

ilWikiAdvMetaDataBlockGUI::$page_id
protected

Definition at line 25 of file class.ilWikiAdvMetaDataBlockGUI.php.

Referenced by fillDataSection().

ilWikiAdvMetaDataBlockGUI::$record
protected

Definition at line 26 of file class.ilWikiAdvMetaDataBlockGUI.php.

ilWikiAdvMetaDataBlockGUI::$records = array()
staticprotected

Definition at line 29 of file class.ilWikiAdvMetaDataBlockGUI.php.

ilWikiAdvMetaDataBlockGUI::$ref_id
protected

Definition at line 24 of file class.ilWikiAdvMetaDataBlockGUI.php.

ilWikiAdvMetaDataBlockGUI::$st_data
static

Definition at line 20 of file class.ilWikiAdvMetaDataBlockGUI.php.


The documentation for this class was generated from the following file: