ILIAS  release_8 Revision v8.24
class.ilResourceStorageInfoGUI.php
Go to the documentation of this file.
1<?php
2
21
27{
29 protected \ILIAS\ResourceStorage\Services $storage;
30 protected \ILIAS\ResourceStorage\Resource\StorableResource $resource;
32 protected bool $is_storage = true;
33
39 {
40 global $DIC;
41 $this->storage = $DIC->resourceStorage();
46 $this->is_storage = false;
47 } else {
48 $this->is_storage = true;
49 $this->identification = $identification;
50 $this->resource = $this->storage->manage()->getResource($this->identification);
51 }
52
53 $this->language = $DIC->language();
54 $this->language->loadLanguageModule('irss');
55 }
56
57 public function append(ilInfoScreenGUI $info): void
58 {
59 if ($this->is_storage) {
60 $info->addSection($this->language->txt("storage_info"));
61 $info->addProperty($this->language->txt("resource_id"), $this->identification->serialize());
62 $info->addProperty($this->language->txt("storage_id"), $this->resource->getStorageID());
63 $info->addProperty($this->language->txt("max_revision"), $this->resource->getMaxRevision());
64 $info->addProperty($this->language->txt("stakeholders"), count($this->resource->getStakeholders()));
65 }
66 }
67}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
Class ilInfoScreenGUI.
addSection(string $a_title)
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
language handling
Class ilResourceStorageInfoGUI.
ILIAS ResourceStorage Resource StorableResource $resource
ILIAS ResourceStorage Services $storage
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc