ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilMStListCoursesGUI Class Reference

Class ilMStListCoursesGUI. More...

+ Inheritance diagram for ilMStListCoursesGUI:
+ Collaboration diagram for ilMStListCoursesGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 
 index ()
 
 listUsers ()
 
 applyFilter ()
 
 resetFilter ()
 
 getId ()
 
 cancel ()
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 
 executeCommand ()
 
 setTableWidth (string $a_width)
 
 getTableWidth ()
 
 setMode (string $a_mode)
 
 getMode ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setTitleIcon (string $a_titleicon)
 
 getTitleIcon ()
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setShowTopButtons (bool $a_val)
 
 getShowTopButtons ()
 
 setForceTopButtons (bool $a_val)
 
 getForceTopButtons ()
 
 addItem ($a_item)
 
 removeItemByPostVar (string $a_post_var, bool $a_remove_unused_headers=false)
 
 getItemByPostVar (string $a_post_var)
 
 setItems (array $a_items)
 
 getItems ()
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage (bool $a_val)
 
 getDisableStandardMessage ()
 
 getHideLabels ()
 
 setHideLabels (bool $a_value=true)
 
 setValuesByArray (array $a_values, bool $a_restrict_to_value_keys=false)
 
 setValuesByPost ()
 
 checkInput ()
 
 getInput (string $a_post_var, bool $ensureValidation=true)
 Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-POST variable, identified by the passed postvar. More...
 
 addCommandButton (string $a_cmd, string $a_text, string $a_id="")
 
 getCommandButtons ()
 
 clearCommandButtons ()
 
 getContent ()
 
 insertItem ( $item, bool $a_sub_item=false)
 
 addAsyncOnloadCode (string $code)
 
 getHTML ()
 
 getHTMLAsync ()
 
 getFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 
 moveFileUpload (string $a_target_directory, string $a_field, ?string $a_target_name=null, ?string $a_index=null, ?string $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

Data Fields

const string CMD_APPLY_FILTER = 'applyFilter'
 
const string CMD_INDEX = 'index'
 
const string CMD_GET_ACTIONS = "getActions"
 
const string CMD_RESET_FILTER = 'resetFilter'
 

Protected Member Functions

 checkAccessOrFail ()
 
- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 
 checkForRequiredField ()
 

Protected Attributes

ilTable2GUI $table
 
ilMyStaffAccess $access
 
- Protected Attributes inherited from ilPropertyFormGUI
bool $required_text = false
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTemplate $tpl
 
ilObjUser $user = null
 
ilSetting $settings = null
 
string $mode = "std"
 
bool $check_input_called = false
 
bool $disable_standard_message = false
 
string $top_anchor = "il_form_top"
 
string $title = ''
 
string $titleicon = ""
 
string $description = ""
 
string $tbl_width = ""
 
bool $show_top_buttons = true
 
bool $hide_labels = false
 
bool $force_top_buttons = false
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
ilGlobalTemplateInterface $global_tpl = null
 
 $onload_code = []
 
- Protected Attributes inherited from ilFormGUI
string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Private Attributes

ilGlobalTemplateInterface $main_tpl
 
ilHelpGUI $help
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMStListCoursesGUI::__construct ( )

Reimplemented from ilPropertyFormGUI.

Definition at line 41 of file class.ilMStListCoursesGUI.php.

42 {
43 global $DIC;
45
46 $this->main_tpl = $DIC->ui()->mainTemplate();
47 $this->access = ilMyStaffAccess::getInstance();
48 $this->help = $DIC->help();
49 $this->help->setScreenIdComponent('msta');
50 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), and ILIAS\Repository\help().

+ Here is the call graph for this function:

Member Function Documentation

◆ applyFilter()

ilMStListCoursesGUI::applyFilter ( )
final

Definition at line 109 of file class.ilMStListCoursesGUI.php.

109 : void
110 {
111 $this->table = new ilMStListCoursesTableGUI($this, self::CMD_APPLY_FILTER);
112 $this->table->writeFilterToSession();
113 $this->table->resetOffset();
114 $this->index();
115 }
Class ilMStListCoursesTableGUI.

References index().

+ Here is the call graph for this function:

◆ cancel()

ilMStListCoursesGUI::cancel ( )
final

Definition at line 132 of file class.ilMStListCoursesGUI.php.

132 : void
133 {
134 global $DIC;
135 $DIC->ctrl()->redirect($this);
136 }

References $DIC.

◆ checkAccessOrFail()

ilMStListCoursesGUI::checkAccessOrFail ( )
protected

Definition at line 52 of file class.ilMStListCoursesGUI.php.

52 : void
53 {
54 if ($this->access->hasCurrentUserAccessToCourseMemberships()) {
55 return;
56 } else {
57 $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
58 $this->ctrl->redirectByClass(ilDashboardGUI::class, "");
59 }
60 }

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by executeCommand(), and listUsers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilMStListCoursesGUI::executeCommand ( )
final
Returns
mixed
Exceptions
ilCtrlException

Reimplemented from ilPropertyFormGUI.

Definition at line 62 of file class.ilMStListCoursesGUI.php.

62 : void
63 {
64 $cmd = $this->ctrl->getCmd();
65 $next_class = $this->ctrl->getNextClass();
66
67 switch ($next_class) {
68 case strtolower(\ilMStListCoursesTableGUI::class):
69 $this->checkAccessOrFail();
70
71 $this->ctrl->setReturn($this, self::CMD_INDEX);
72 $this->table = new \ilMStListCoursesTableGUI($this, self::CMD_INDEX);
73 $this->ctrl->forwardCommand($this->table);
74 break;
75 default:
76 switch ($cmd) {
79 case self::CMD_INDEX:
81 $this->$cmd();
82 break;
83 default:
84 $this->index();
85 break;
86 }
87 break;
88 }
89 }

References checkAccessOrFail(), CMD_APPLY_FILTER, CMD_GET_ACTIONS, CMD_INDEX, CMD_RESET_FILTER, ILIAS\Repository\ctrl(), and index().

+ Here is the call graph for this function:

◆ getId()

ilMStListCoursesGUI::getId ( )
final

Reimplemented from ilFormGUI.

Definition at line 125 of file class.ilMStListCoursesGUI.php.

125 : string
126 {
127 $this->table = new ilMStListCoursesTableGUI($this, self::CMD_INDEX);
128
129 return $this->table->getId();
130 }

◆ index()

ilMStListCoursesGUI::index ( )
final

Definition at line 91 of file class.ilMStListCoursesGUI.php.

91 : void
92 {
93 $this->listUsers();
94 }

References listUsers().

Referenced by applyFilter(), executeCommand(), and resetFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsers()

ilMStListCoursesGUI::listUsers ( )
final

Definition at line 96 of file class.ilMStListCoursesGUI.php.

96 : void
97 {
98 global $DIC;
99
100 $this->checkAccessOrFail();
101 $this->help->setScreenId('courses_list');
102
103 $this->table = new ilMStListCoursesTableGUI($this, self::CMD_INDEX);
104 $DIC->ui()->mainTemplate()->setTitle($DIC->language()->txt('mst_list_courses'));
105 $DIC->ui()->mainTemplate()->setTitleIcon(ilUtil::getImagePath('standard/icon_enrl.svg'));
106 $DIC->ui()->mainTemplate()->setContent($this->table->getHTML());
107 }
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References $DIC, checkAccessOrFail(), ilUtil\getImagePath(), and ILIAS\Repository\help().

Referenced by index().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetFilter()

ilMStListCoursesGUI::resetFilter ( )
final

Definition at line 117 of file class.ilMStListCoursesGUI.php.

117 : void
118 {
119 $this->table = new ilMStListCoursesTableGUI($this, self::CMD_RESET_FILTER);
120 $this->table->resetOffset();
121 $this->table->resetFilter();
122 $this->index();
123 }

References index().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilMyStaffAccess ilMStListCoursesGUI::$access
protected

Definition at line 37 of file class.ilMStListCoursesGUI.php.

◆ $help

ilHelpGUI ilMStListCoursesGUI::$help
private

Definition at line 39 of file class.ilMStListCoursesGUI.php.

◆ $main_tpl

ilGlobalTemplateInterface ilMStListCoursesGUI::$main_tpl
private

Definition at line 38 of file class.ilMStListCoursesGUI.php.

◆ $table

ilTable2GUI ilMStListCoursesGUI::$table
protected

Definition at line 36 of file class.ilMStListCoursesGUI.php.

◆ CMD_APPLY_FILTER

const string ilMStListCoursesGUI::CMD_APPLY_FILTER = 'applyFilter'

Definition at line 32 of file class.ilMStListCoursesGUI.php.

Referenced by executeCommand().

◆ CMD_GET_ACTIONS

const string ilMStListCoursesGUI::CMD_GET_ACTIONS = "getActions"

Definition at line 34 of file class.ilMStListCoursesGUI.php.

Referenced by executeCommand().

◆ CMD_INDEX

const string ilMStListCoursesGUI::CMD_INDEX = 'index'

◆ CMD_RESET_FILTER

const string ilMStListCoursesGUI::CMD_RESET_FILTER = 'resetFilter'

Definition at line 35 of file class.ilMStListCoursesGUI.php.

Referenced by executeCommand().


The documentation for this class was generated from the following file: