ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilResourceStorageInfoGUI.php
Go to the documentation of this file.
1 <?php
2 
22 
28 {
30  protected Services $storage;
32  protected ilLanguage $language;
33  protected bool $is_storage = true;
34 
39  public function __construct(?ResourceIdentification $identification = null)
40  {
41  global $DIC;
42  $this->storage = $DIC->resourceStorage();
46  if (!$identification instanceof ResourceIdentification) {
47  $this->is_storage = false;
48  } else {
49  $this->is_storage = true;
50  $this->identification = $identification;
51  $this->resource = $this->storage->manage()->getResource($this->identification);
52  }
53 
54  $this->language = $DIC->language();
55  $this->language->loadLanguageModule('irss');
56  }
57 
58  public function append(ilInfoScreenGUI $info): void
59  {
60  if ($this->is_storage) {
61  $info->addSection($this->language->txt("storage_info"));
62  $info->addProperty($this->language->txt("resource_id"), $this->identification->serialize());
63  $info->addProperty($this->language->txt("storage_id"), $this->resource->getStorageID());
64  $info->addProperty($this->language->txt("max_revision"), $this->resource->getMaxRevision());
65  $info->addProperty($this->language->txt("stakeholders"), count($this->resource->getStakeholders()));
66  }
67  }
68 }
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
Class ilResourceStorageInfoGUI.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:22
addSection(string $a_title)
__construct(Container $dic, ilPlugin $plugin)
language()
description: > Example for rendring a language glyph.
Definition: language.php:41