ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 CMD_APPLY_FILTER = 'applyFilter'
 
const CMD_INDEX = 'index'
 
const CMD_GET_ACTIONS = "getActions"
 
const CMD_RESET_FILTER = 'resetFilter'
 

Protected Member Functions

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

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
 
ILIAS HTTP Wrapper ArrayBasedRequestWrapper $queryWrapper
 
ilHelpGUI $help
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMStListCoursesGUI::__construct ( )

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

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

42  {
43  global $DIC;
45 
46  $this->main_tpl = $DIC->ui()->mainTemplate();
47  $this->access = ilMyStaffAccess::getInstance();
48  $this->help = $DIC->help();
49  $this->queryWrapper = $DIC->http()->wrapper()->query();
50  $this->help->setScreenIdComponent('msta');
51  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ applyFilter()

ilMStListCoursesGUI::applyFilter ( )
final

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

References index().

111  : void
112  {
113  $this->table = new ilMStListCoursesTableGUI($this, self::CMD_APPLY_FILTER);
114  $this->table->writeFilterToSession();
115  $this->table->resetOffset();
116  $this->index();
117  }
Class ilMStListCoursesTableGUI.
+ Here is the call graph for this function:

◆ cancel()

ilMStListCoursesGUI::cancel ( )
final

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

References $DIC.

134  : void
135  {
136  global $DIC;
137  $DIC->ctrl()->redirect($this);
138  }
global $DIC
Definition: feed.php:28

◆ checkAccessOrFail()

ilMStListCoursesGUI::checkAccessOrFail ( )
protected

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

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

Referenced by executeCommand(), and listUsers().

53  : void
54  {
55  if ($this->access->hasCurrentUserAccessToCourseMemberships()) {
56  return;
57  } else {
58  $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
59  $this->ctrl->redirectByClass(ilDashboardGUI::class, "");
60  }
61  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilMStListCoursesGUI::executeCommand ( )
final

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

References checkAccessOrFail(), ILIAS\Repository\ctrl(), and index().

63  : void
64  {
65  $cmd = $this->ctrl->getCmd();
66  $next_class = $this->ctrl->getNextClass();
67 
68  switch ($next_class) {
69  case strtolower(\ilMStListCoursesTableGUI::class):
70  $this->checkAccessOrFail();
71 
72  $this->ctrl->setReturn($this, self::CMD_INDEX);
73  $this->table = new \ilMStListCoursesTableGUI($this, self::CMD_INDEX);
74  $this->ctrl->forwardCommand($this->table);
75  break;
76  default:
77  switch ($cmd) {
78 
79  case self::CMD_RESET_FILTER:
80  case self::CMD_APPLY_FILTER:
81  case self::CMD_INDEX:
82  case self::CMD_GET_ACTIONS:
83  $this->$cmd();
84  break;
85  default:
86  $this->index();
87  break;
88  }
89  break;
90  }
91  }
+ Here is the call graph for this function:

◆ getId()

ilMStListCoursesGUI::getId ( )
final

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

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

◆ index()

ilMStListCoursesGUI::index ( )
final

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

References listUsers().

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

93  : void
94  {
95  $this->listUsers();
96  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsers()

ilMStListCoursesGUI::listUsers ( )
final

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

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

Referenced by index().

98  : void
99  {
100  global $DIC;
101 
102  $this->checkAccessOrFail();
103  $this->help->setScreenId('courses_list');
104 
105  $this->table = new ilMStListCoursesTableGUI($this, self::CMD_INDEX);
106  $DIC->ui()->mainTemplate()->setTitle($DIC->language()->txt('mst_list_courses'));
107  $DIC->ui()->mainTemplate()->setTitleIcon(ilUtil::getImagePath('icon_enrl.svg'));
108  $DIC->ui()->mainTemplate()->setContent($this->table->getHTML());
109  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
Class ilMStListCoursesTableGUI.
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetFilter()

ilMStListCoursesGUI::resetFilter ( )
final

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

References index().

119  : void
120  {
121  $this->table = new ilMStListCoursesTableGUI($this, self::CMD_RESET_FILTER);
122  $this->table->resetOffset();
123  $this->table->resetFilter();
124  $this->index();
125  }
Class ilMStListCoursesTableGUI.
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilMyStaffAccess ilMStListCoursesGUI::$access
protected

Definition at line 36 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 37 of file class.ilMStListCoursesGUI.php.

◆ $queryWrapper

ILIAS HTTP Wrapper ArrayBasedRequestWrapper ilMStListCoursesGUI::$queryWrapper
private

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

◆ $table

ilTable2GUI ilMStListCoursesGUI::$table
protected

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

◆ CMD_APPLY_FILTER

const ilMStListCoursesGUI::CMD_APPLY_FILTER = 'applyFilter'

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

◆ CMD_GET_ACTIONS

const ilMStListCoursesGUI::CMD_GET_ACTIONS = "getActions"

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

◆ CMD_INDEX

const ilMStListCoursesGUI::CMD_INDEX = 'index'

◆ CMD_RESET_FILTER

const ilMStListCoursesGUI::CMD_RESET_FILTER = 'resetFilter'

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


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