ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilObjRemoteGlossaryListGUI.php
Go to the documentation of this file.
1 <?php
2 
18 declare(strict_types=1);
19 
29 {
36  public function __construct()
37  {
39  }
40 
46  public function init(): void
47  {
48  $this->copy_enabled = false;
49  $this->static_link_enabled = true;
50  $this->delete_enabled = true;
51  $this->cut_enabled = true;
52  $this->subscribe_enabled = true;
53  $this->link_enabled = true;
54  $this->info_screen_enabled = true;
55  $this->type = 'rglo';
56  $this->gui_class_name = 'ilobjremoteglossarygui';
57 
58  $this->substitutions = ilAdvancedMDSubstitution::_getInstanceByObjectType($this->type);
59  if ($this->substitutions->isActive()) {
60  $this->substitutions_enabled = true;
61  }
62 
63  // general commands array
64  $this->commands = ilObjRemoteGlossaryAccess::_getCommands();
65  }
66 
67 
68 
76  public function getProperties(): array
77  {
78  if ($org = $this->_lookupOrganization(ilObjRemoteGlossary::DB_TABLE_NAME, $this->obj_id)) {
79  $this->addCustomProperty($this->lng->txt('organization'), $org, false, true);
80  }
81  if (!ilObjRemoteGlossary::_lookupOnline($this->obj_id)) {
82  $this->addCustomProperty($this->lng->txt("status"), $this->lng->txt("offline"), true, true);
83  }
84 
85  return array();
86  }
87 
95  public function getCommandFrame(string $cmd): string
96  {
97  switch ($cmd) {
98  case 'show':
99  if (ilECSExportManager::getInstance()->_isRemote(
100  ilECSImportManager::getInstance()->lookupServerId($this->obj_id),
101  (int) ilECSImportManager::getInstance()->_lookupEContentId($this->obj_id)
102  )) {
103  return '_blank';
104  }
105 
106  // no break
107  default:
108  return parent::getCommandFrame($cmd);
109  }
110  }
111 } // END class.ilObjRemoteGlossaryListGUI
_lookupOrganization(string $table, int $a_obj_id)
lookup organization
static getInstance()
Get the singelton instance of this ilECSExportManager.
getCommandFrame(string $cmd)
get command frame
static getInstance()
Get the singleton instance of this ilECSImportManager.
__construct(Container $dic, ilPlugin $plugin)
addCustomProperty(string $property="", string $value="", bool $alert=false, bool $newline=false)
static _lookupOnline($a_obj_id)
Lookup online.
static _getInstanceByObjectType(string $a_type)