ILIAS  release_8 Revision v8.24
class.ilObjRemoteCourseListGUI.php
Go to the documentation of this file.
1<?php
2
18declare(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 = 'rcrs';
56 $this->gui_class_name = 'ilobjremotecoursegui';
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 = ilObjRemoteCourseAccess::_getCommands();
65 }
66
67
75 public function getProperties(): array
76 {
77 global $lng;
78
79
80 if ($org = $this->_lookupOrganization(ilObjRemoteCourse::DB_TABLE_NAME, $this->obj_id)) {
81 $this->addCustomProperty($lng->txt('organization'), $org, false, true);
82 }
83 if (!ilObjRemoteCourse::_lookupOnline($this->obj_id)) {
84 $this->addCustomProperty($lng->txt("status"), $lng->txt("offline"), true, true);
85 }
86
87 return array();
88 }
89
97 public function getCommandFrame(string $cmd): string
98 {
99 switch ($cmd) {
100 case 'show':
101 if (ilECSExportManager::getInstance()->_isRemote(
102 ilECSImportManager::getInstance()->lookupServerId($this->obj_id),
103 (int) ilECSImportManager::getInstance()->_lookupEContentId($this->obj_id)
104 )) {
105 return '_blank';
106 }
107
108 // no break
109 default:
110 return parent::getCommandFrame($cmd);
111 }
112 }
113}
static _getInstanceByObjectType(string $a_type)
static getInstance()
Get the singelton instance of this ilECSExportManager.
static getInstance()
Get the singleton instance of this ilECSImportManager.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getProperties()
get properties (offline)
getCommandFrame(string $cmd)
q get command frame
static _lookupOnline($a_obj_id)
Lookup online.
addCustomProperty(string $property="", string $value="", bool $alert=false, bool $newline=false)
_lookupOrganization(string $table, int $a_obj_id)
lookup organization
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc