ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilMStListCompetencesGUI Class Reference

Class ilMStListCompetencesGUI. More...

+ Collaboration diagram for ilMStListCompetencesGUI:

Public Member Functions

 __construct (Container $dic=null)
 
 executeCommand ()
 
 index ()
 
 getActions ()
 

Data Fields

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

Protected Member Functions

 checkAccessOrFail ()
 
 addSubTabs (string $subtab_active)
 

Protected Attributes

 $table
 
 $access
 

Private Attributes

 $dic
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMStListCompetencesGUI::__construct ( Container  $dic = null)
Parameters
Container$dic

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

References $dic, and $DIC.

40  {
41  if (is_null($dic)) {
42  global $DIC;
43  $dic = $DIC;
44  }
45  $this->access = ilMyStaffAccess::getInstance();
46  $this->dic = $dic;
47  }
$DIC
Definition: xapitoken.php:46

Member Function Documentation

◆ addSubTabs()

ilMStListCompetencesGUI::addSubTabs ( string  $subtab_active)
protected
Parameters
string$subtab_active

Definition at line 94 of file class.ilMStListCompetencesGUI.php.

Referenced by executeCommand().

94  : void
95  {
96  $this->dic->language()->loadLanguageModule('skmg');
97  $this->dic->tabs()->addSubTab(
98  self::SUB_TAB_SKILLS,
99  $this->dic->language()->txt('skmg_selected_skills'),
100  $this->dic->ctrl()->getLinkTargetByClass([
101  self::class,
102  ilMStListCompetencesSkillsGUI::class
103  ])
104  );
105 
106  $this->dic->tabs()->activateSubTab($subtab_active);
107  }
+ Here is the caller graph for this function:

◆ checkAccessOrFail()

ilMStListCompetencesGUI::checkAccessOrFail ( )
protected

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

References ilUtil\sendFailure().

54  {
55  if ($this->access->hasCurrentUserAccessToMyStaff()) {
56  return;
57  } else {
58  ilUtil::sendFailure($this->dic->language()->txt("permission_denied"), true);
59  $this->dic->ctrl()->redirectByClass(ilDashboardGUI::class, "");
60  }
61  }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ executeCommand()

ilMStListCompetencesGUI::executeCommand ( )

Definition at line 67 of file class.ilMStListCompetencesGUI.php.

References addSubTabs(), and index().

68  {
69  $cmd = $this->dic->ctrl()->getCmd();
70  $next_class = $this->dic->ctrl()->getNextClass();
71  switch ($next_class) {
72  case strtolower(ilMStListCompetencesSkillsGUI::class):
73  $this->addSubTabs(self::SUB_TAB_SKILLS);
74  $gui = new ilMStListCompetencesSkillsGUI($this->dic);
75  $this->dic->ctrl()->forwardCommand($gui);
76  break;
77  default:
78  switch ($cmd) {
79  case self::CMD_INDEX:
80  $this->$cmd();
81  break;
82  default:
83  $this->index();
84  break;
85  }
86  break;
87  }
88  }
+ Here is the call graph for this function:

◆ getActions()

ilMStListCompetencesGUI::getActions ( )

Definition at line 122 of file class.ilMStListCompetencesGUI.php.

References ilLink\_getStaticLink(), ilObject2\_lookupObjectId(), ilObject2\_lookupTitle(), exit, ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), and ActiveRecord\innerjoin().

123  {
124  $mst_co_usr_id = $this->dic->http()->request()->getQueryParams()['mst_lco_usr_id'];
125  $mst_lco_crs_ref_id = $this->dic->http()->request()->getQueryParams()['mst_lco_crs_ref_id'];
126 
127  if ($mst_co_usr_id > 0 && $mst_lco_crs_ref_id > 0) {
128  $selection = new ilAdvancedSelectionListGUI();
129 
130  if ($this->dic->access()->checkAccess("visible", "", $mst_lco_crs_ref_id)) {
131  $link = ilLink::_getStaticLink($mst_lco_crs_ref_id, ilMyStaffAccess::DEFAULT_CONTEXT);
132  $selection->addItem(ilObject2::_lookupTitle(ilObject2::_lookupObjectId($mst_lco_crs_ref_id)), '', $link);
133  };
134 
136  foreach (
137  ilOrgUnitUserAssignment::innerjoin('object_reference', 'orgu_id', 'ref_id')->where(array(
138  'user_id' => $mst_co_usr_id,
139  'object_reference.deleted' => null
140  ), array('user_id' => '=', 'object_reference.deleted' => '!='))->get() as $org_unit_assignment
141  ) {
142  if ($this->dic->access()->checkAccess("read", "", $org_unit_assignment->getOrguId())) {
143  $link = ilLink::_getStaticLink($org_unit_assignment->getOrguId(), 'orgu');
144  $selection->addItem($org_units[$org_unit_assignment->getOrguId()], '', $link);
145  }
146  }
147 
148  $selection = ilMyStaffGUI::extendActionMenuWithUserActions($selection, $mst_co_usr_id, rawurlencode($this->dic->ctrl()
149  ->getLinkTarget($this, self::CMD_INDEX)));
150 
151  echo $selection->getHTML(true);
152  }
153  exit;
154  }
exit
Definition: login.php:29
static _lookupTitle($a_id)
static innerjoin($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
static _lookupObjectId($a_ref_id)
static getTextRepresentationOfOrgUnits($sort_by_title=true)
Get ref id path array.
+ Here is the call graph for this function:

◆ index()

ilMStListCompetencesGUI::index ( )

Definition at line 113 of file class.ilMStListCompetencesGUI.php.

Referenced by executeCommand().

114  {
115  $this->dic->ctrl()->redirectByClass(ilMStListCompetencesSkillsGUI::class);
116  }
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilMStListCompetencesGUI::$access
protected

Definition at line 29 of file class.ilMStListCompetencesGUI.php.

◆ $dic

ilMStListCompetencesGUI::$dic
private

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

Referenced by __construct().

◆ $table

ilMStListCompetencesGUI::$table
protected

Definition at line 25 of file class.ilMStListCompetencesGUI.php.

◆ CMD_APPLY_FILTER

const ilMStListCompetencesGUI::CMD_APPLY_FILTER = 'applyFilter'

Definition at line 17 of file class.ilMStListCompetencesGUI.php.

◆ CMD_GET_ACTIONS

const ilMStListCompetencesGUI::CMD_GET_ACTIONS = "getActions"

Definition at line 19 of file class.ilMStListCompetencesGUI.php.

◆ CMD_INDEX

const ilMStListCompetencesGUI::CMD_INDEX = 'index'

◆ CMD_RESET_FILTER

const ilMStListCompetencesGUI::CMD_RESET_FILTER = 'resetFilter'

Definition at line 20 of file class.ilMStListCompetencesGUI.php.

◆ SUB_TAB_SKILLS

const ilMStListCompetencesGUI::SUB_TAB_SKILLS = 'skills'

Definition at line 21 of file class.ilMStListCompetencesGUI.php.


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