ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilObjRemoteWikiListGUI.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 = 'rwik';
56  $this->gui_class_name = 'ilobjremotewikigui';
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 = ilObjRemoteWikiAccess::_getCommands();
65  }
66 
67 
75  public function getProperties(): array
76  {
77  if ($org = $this->_lookupOrganization(ilObjRemoteWiki::DB_TABLE_NAME, $this->obj_id)) {
78  $this->addCustomProperty($this->lng->txt('organization'), $org, false, true);
79  }
80  if (!ilObjRemoteWiki::_lookupOnline($this->obj_id)) {
81  $this->addCustomProperty($this->lng->txt("status"), $this->lng->txt("offline"), true, true);
82  }
83 
84  return array();
85  }
86 
94  public function getCommandFrame(string $cmd): string
95  {
96  switch ($cmd) {
97  case 'show':
98  if (ilECSExportManager::getInstance()->_isRemote(
99  ilECSImportManager::getInstance()->lookupServerId($this->obj_id),
100  (int) ilECSImportManager::getInstance()->_lookupEContentId($this->obj_id)
101  )) {
102  return '_blank';
103  }
104 
105  // no break
106  default:
107  return parent::getCommandFrame($cmd);
108  }
109  }
110 }
_lookupOrganization(string $table, int $a_obj_id)
lookup organization
getCommandFrame(string $cmd)
get command frame
static getInstance()
Get the singelton instance of this ilECSExportManager.
static getInstance()
Get the singleton instance of this ilECSImportManager.
static _lookupOnline($a_obj_id)
Lookup online.
getProperties()
get properties (offline)
__construct(Container $dic, ilPlugin $plugin)
static _getCommands()
get commands
addCustomProperty(string $property="", string $value="", bool $alert=false, bool $newline=false)
static _getInstanceByObjectType(string $a_type)