ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjRemoteCourseListGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
30{
37 public function __construct()
38 {
40 }
41
47 public function init(): void
48 {
49 $this->copy_enabled = false;
50 $this->static_link_enabled = true;
51 $this->delete_enabled = true;
52 $this->cut_enabled = true;
53 $this->subscribe_enabled = true;
54 $this->link_enabled = true;
55 $this->info_screen_enabled = true;
56 $this->type = 'rcrs';
57 $this->gui_class_name = 'ilobjremotecoursegui';
58
59 $this->substitutions = ilAdvancedMDSubstitution::_getInstanceByObjectType($this->type);
60 if ($this->substitutions->isActive()) {
61 $this->substitutions_enabled = true;
62 }
63
64 // general commands array
65 $this->commands = ilObjRemoteCourseAccess::_getCommands();
66 }
67
68
76 public function getProperties(): array
77 {
78 global $lng;
79
80
81 if ($org = $this->_lookupOrganization(ilObjRemoteCourse::DB_TABLE_NAME, $this->obj_id)) {
82 $this->addCustomProperty($lng->txt('organization'), $org, false, true);
83 }
84 if (!ilObjRemoteCourse::_lookupOnline($this->obj_id)) {
85 $this->addCustomProperty($lng->txt("status"), $lng->txt("offline"), true, true);
86 }
87
88 return array();
89 }
90
98 public function getCommandFrame(string $cmd): string
99 {
100 switch ($cmd) {
101 case 'show':
102 if (ilECSExportManager::getInstance()->_isRemote(
103 ilECSImportManager::getInstance()->lookupServerId($this->obj_id),
104 (int) ilECSImportManager::getInstance()->_lookupEContentId($this->obj_id)
105 )) {
106 return '_blank';
107 }
108
109 // no break
110 default:
111 return parent::getCommandFrame($cmd);
112 }
113 }
114}
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