ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjectMetaDataBlockGUI Class Reference

Metadata block. More...

+ Inheritance diagram for ilObjectMetaDataBlockGUI:
+ Collaboration diagram for ilObjectMetaDataBlockGUI:

Public Member Functions

 __construct (ilAdvancedMDRecord $record, ?array $decorator_callback=null)
 Takes as an optional second input an array consisting of the object that the method that should be called back to belongs to, and a string with the name of the method. More...
 
 getBlockType ()
 
 setValues (ilAdvancedMDValues $a_values)
 
 executeCommand ()
 execute command More...
 
- Public Member Functions inherited from ilBlockGUI
 __construct ()
 
 getBlockType ()
 
 setData (array $a_data)
 
 getData ()
 
 setPresentation (int $type)
 
 getPresentation ()
 
 setBlockId (string $a_block_id="0")
 
 getBlockId ()
 
 setGuiObject (object $a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setOffset (int $a_offset)
 
 getOffset ()
 
 checkOffset (int $offset)
 
 setLimit (int $a_limit)
 
 getLimit ()
 
 setEnableEdit (bool $a_enableedit)
 
 getEnableEdit ()
 
 setRepositoryMode (bool $a_repositorymode)
 
 getRepositoryMode ()
 
 setSubtitle (string $a_subtitle)
 
 getSubtitle ()
 
 setRefId (int $a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 
 setAdminCommands (bool $a_admincommands)
 
 getAdminCommands ()
 
 setEnableNumInfo (bool $a_enablenuminfo)
 
 getEnableNumInfo ()
 
 setProperties (array $a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty (string $a_property)
 
 setProperty (string $a_property, string $a_value)
 
 setRowTemplate (string $a_rowtemplatename, string $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 
 getRowTemplateDir ()
 
 addBlockCommand (string $a_href, string $a_text, string $a_onclick="", ?RoundTrip $modal=null)
 
 getBlockCommands ()
 
 getHTML ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 getPaginationViewControl ()
 Fill previous/next row. More...
 
 getViewControlsForPanel ()
 
 sortObject ()
 
 addSortOption (string $option, string $label, bool $active)
 
 setSortTarget (string $target)
 
 addPresentation (string $label, string $target, bool $active)
 
 getNoItemFoundContent ()
 

Static Public Member Functions

static getScreenMode ()
 Get Screen Mode for current command. More...
 
- Static Public Member Functions inherited from ilBlockGUI
static getScreenMode ()
 

Static Public Attributes

static string $block_type = "advmd"
 

Protected Member Functions

 isRepositoryObject ()
 
 getLegacyContent ()
 
- Protected Member Functions inherited from ilBlockGUI
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 specialCharsAsEntities (string $string)
 
 initCommands ()
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 
 getLegacyContent ()
 Get legacy content. More...
 
 getListItemForData (array $data)
 Get list item for data array. More...
 
 handleNavigation ()
 Handle navigation. More...
 
 loadData ()
 Load data for current page. More...
 
 getListItemGroups ()
 Get items. More...
 
 addRepoCommands ()
 Add repo commands. More...
 
 getActionsForPanel ()
 
 send (string $output)
 Send. More...
 

Protected Attributes

ilAdvancedMDRecord $record
 
ilAdvancedMDValues $values
 
array $callback
 
- Protected Attributes inherited from ilBlockGUI
ILIAS UI Renderer $renderer
 
Factory $factory
 
object $gui_object
 
ILIAS Block StandardGUIRequest $request
 
ILIAS Block BlockManager $block_manager
 
bool $repositorymode = false
 
ILIAS DI UIServices $ui
 
array $data = array()
 
bool $enablenuminfo = true
 
array $footer_links = array()
 
string $block_id = "0"
 
bool $allow_moving = true
 
array $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
array $block_commands = array()
 
int $max_count = 0
 
bool $close_command = false
 
bool $image = false
 
array $property = []
 
string $nav_value = ""
 
string $css_row = ""
 
string $title = ""
 
bool $admincommands = false
 
array $dropdown
 
ilTemplate $tpl
 
ilGlobalTemplateInterface $main_tpl
 
ilObjUser $user
 
ilCtrl $ctrl
 
ilAccessHandler $access
 
ilLanguage $lng
 
ilObjectDefinition $obj_def
 
int $presentation
 
int $requested_ref_id
 

Static Protected Attributes

static array $records = []
 

Additional Inherited Members

- Data Fields inherited from ilBlockGUI
const PRES_MAIN_LEG = 0
 
const PRES_SEC_LEG = 1
 
const PRES_SEC_LIST = 2
 
const PRES_MAIN_LIST = 3
 
const PRES_MAIN_TILE = 4
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjectMetaDataBlockGUI::__construct ( ilAdvancedMDRecord  $record,
?array  $decorator_callback = null 
)

Takes as an optional second input an array consisting of the object that the method that should be called back to belongs to, and a string with the name of the method.

Parameters
ilAdvancedMDRecord$record
null|array{0ilObject, 1: string} $decorator_callback

Definition at line 43 of file class.ilObjectMetaDataBlockGUI.php.

References $DIC, $record, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ilAdvancedMDRecordTranslations\getInstanceByRecordId(), ILIAS\Repository\lng(), ilBlockGUI\setBlockId(), ilBlockGUI\setEnableNumInfo(), and ilBlockGUI\setTitle().

44  {
45  global $DIC;
46 
47  $this->ctrl = $DIC->ctrl();
48  $this->lng = $DIC->language();
49 
50 
52 
53  $this->record = $record;
54  $this->callback = $decorator_callback;
55 
56  $translations = ilAdvancedMDRecordTranslations::getInstanceByRecordId($this->record->getRecordId());
57  $this->setTitle($translations->getTitleForLanguage($this->lng->getLangKey()));
58  $this->setBlockId("advmd_" . $this->record->getRecordId());
59  $this->setEnableNumInfo(false);
60  $this->allow_moving = false;
61  }
setBlockId(string $a_block_id="0")
setEnableNumInfo(bool $a_enablenuminfo)
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
setTitle(string $a_title)
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilObjectMetaDataBlockGUI::executeCommand ( )

execute command

Definition at line 95 of file class.ilObjectMetaDataBlockGUI.php.

References ILIAS\Repository\ctrl().

95  : void
96  {
97  $this->ctrl->getNextClass();
98  $cmd = $this->ctrl->getCmd("getHTML");
99  $this->$cmd();
100  }
+ Here is the call graph for this function:

◆ getBlockType()

ilObjectMetaDataBlockGUI::getBlockType ( )

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

66  : string
67  {
68  return self::$block_type;
69  }

◆ getLegacyContent()

ilObjectMetaDataBlockGUI::getLegacyContent ( )
protected

Definition at line 105 of file class.ilObjectMetaDataBlockGUI.php.

References ilADTFactory\getInstance(), ilAdvancedMDFieldTranslations\getInstanceByRecordId(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

105  : string
106  {
107  $btpl = new ilTemplate("tpl.advmd_block.html", true, true, "components/ILIAS/ILIASObject");
108 
109  // see ilAdvancedMDRecordGUI::parseInfoPage()
110 
113 
114  // this correctly binds group and definitions
115  $this->values->read();
116 
117  $defs = $this->values->getDefinitions();
118  foreach ($this->values->getADTGroup()->getElements() as $element_id => $element) {
119  $field_translations = ilAdvancedMDFieldTranslations::getInstanceByRecordId($defs[$element_id]->getRecordId());
120 
121  $btpl->setCurrentBlock("item");
122  $btpl->setVariable("CAPTION", $field_translations->getTitleForLanguage($element_id, $this->lng->getLangKey()));
123  if ($element->isNull()) {
124  $value = "-";
125  } else {
126  $value = ilADTFactory::getInstance()->getPresentationBridgeForInstance($element);
127 
128  if (in_array($element->getType(), ["MultiEnum", "Enum", "Text"])) {
129  $value->setDecoratorCallBack($this->callback);
130  }
131 
132  $value = $value->getHTML();
133  }
134  $btpl->setVariable("VALUE", $value);
135  $btpl->parseCurrentBlock();
136  }
137 
138  $html = $btpl->get();
139 
141 
142  return $html;
143  }
static array static setUseRelativeDates(bool $a_status)
set use relative dates
+ Here is the call graph for this function:

◆ getScreenMode()

static ilObjectMetaDataBlockGUI::getScreenMode ( )
static

Get Screen Mode for current command.

Definition at line 82 of file class.ilObjectMetaDataBlockGUI.php.

References IL_SCREEN_SIDE.

82  : string
83  {
84  return IL_SCREEN_SIDE;
85  }
const IL_SCREEN_SIDE

◆ isRepositoryObject()

ilObjectMetaDataBlockGUI::isRepositoryObject ( )
protected

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

74  : bool
75  {
76  return false;
77  }

◆ setValues()

ilObjectMetaDataBlockGUI::setValues ( ilAdvancedMDValues  $a_values)

Definition at line 87 of file class.ilObjectMetaDataBlockGUI.php.

87  : void
88  {
89  $this->values = $a_values;
90  }

Field Documentation

◆ $block_type

string ilObjectMetaDataBlockGUI::$block_type = "advmd"
static

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

◆ $callback

array ilObjectMetaDataBlockGUI::$callback
protected

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

◆ $record

ilAdvancedMDRecord ilObjectMetaDataBlockGUI::$record
protected

Definition at line 32 of file class.ilObjectMetaDataBlockGUI.php.

Referenced by __construct().

◆ $records

array ilObjectMetaDataBlockGUI::$records = []
staticprotected

Definition at line 30 of file class.ilObjectMetaDataBlockGUI.php.

◆ $values

ilAdvancedMDValues ilObjectMetaDataBlockGUI::$values
protected

Definition at line 33 of file class.ilObjectMetaDataBlockGUI.php.


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