49    public function __construct($a_node_type, $a_access_handler, $a_obj_type, $a_node_id, $a_obj_id)
 
   53        $this->ctrl = 
$DIC->ctrl();
 
   55        $this->node_type = (int) $a_node_type;
 
   56        $this->access_handler = $a_access_handler;
 
   57        $this->obj_type = (string) $a_obj_type;
 
   58        $this->node_id = (int) $a_node_id;
 
   59        $this->obj_id = (int) $a_obj_id;
 
   90    public static function buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type = 
null, $a_sub_id = 
null)
 
   92        return $a_node_type . 
";" . $a_node_id . 
";" . $a_obj_type . 
";" .
 
   93            $a_obj_id . 
";" . $a_sub_type . 
";" . $a_sub_id;
 
  105        $ilAccess = 
$DIC->access();
 
  108        if (isset(
$_GET[
"cadh"])) {
 
  109            $parts = explode(
";", (
string) 
$_GET[
"cadh"]);
 
  120                    $access_handler = $ilAccess;
 
  124                    include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
 
  126                    include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
 
  143                $dispatcher->enableCommentsSettings(
true);
 
  156        if ($this->node_id &&
 
  157            !$this->access_handler->checkAccess(
"visible", 
"", $this->node_id) &&
 
  158            !$this->access_handler->checkAccess(
"read", 
"", $this->node_id)) {
 
  162        $next_class = 
$ilCtrl->getNextClass($this);
 
  165        $ilCtrl->saveParameter($this, 
"cadh");
 
  167        switch ($next_class) {
 
  171                if ($this->sub_type) {
 
  175                include_once 
"Services/Notes/classes/class.ilNoteGUI.php";
 
  177                $note_gui->enablePrivateNotes(
true);
 
  179                $has_write = $this->access_handler->checkAccess(
"write", 
"", $this->node_id);
 
  180                if ($has_write && 
$ilSetting->get(
"comments_del_tutor", 1)) {
 
  181                    $note_gui->enablePublicNotesDeletion(
true);
 
  185                if ($this->enable_comments_settings) {
 
  188                        $this->access_handler->checkAccess(
"edit_permissions", 
"", $this->node_id)) {
 
  189                        $note_gui->enableCommentsSettings();
 
  194                elseif ($this->sub_id) {
 
  195                    $note_gui->enablePublicNotes(
true);
 
  198                $ilCtrl->forwardCommand($note_gui);
 
  202                include_once 
"Services/Tagging/classes/class.ilTaggingGUI.php";
 
  204                $tags_gui->setObject($this->obj_id, $this->obj_type);
 
  205                $ilCtrl->forwardCommand($tags_gui);
 
  208            case "ilobjectactivationgui":
 
  209                $ilCtrl->setParameter($this, 
"parent_id", (
int) $_REQUEST[
'parent_id']);
 
  210                include_once 
'Services/Object/classes/class.ilObjectActivationGUI.php';
 
  212                $ilCtrl->forwardCommand($act_gui);
 
  216                include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
 
  218                if (!
$_GET[
"rnsb"]) {
 
  219                    $rating_gui->setObject($this->obj_id, $this->obj_type, $this->sub_id, $this->sub_type);
 
  222                    $rating_gui->setObject($this->obj_id, $this->obj_type);
 
  224                $ilCtrl->forwardCommand($rating_gui);
 
  225                if ($this->rating_callback) {
 
  228                    $ilCtrl->redirect($this->rating_callback[0], $this->rating_callback[1]);
 
  247        $this->sub_type = (string) $a_sub_obj_type;
 
  248        $this->sub_id = (int) $a_sub_obj_id;
 
  258        $this->enable_comments_settings = (bool) $a_value;
 
  269        $this->rating_callback = array($a_gui, $a_cmd);
 
  278        if ($this->node_id &&
 
  279            !$this->access_handler->checkAccess(
"visible", 
"", $this->node_id) &&
 
  280            !$this->access_handler->checkAccess(
"read", 
"", $this->node_id)) {
 
  284        include_once 
'Services/Object/classes/class.ilObjectListGUIFactory.php';
 
  287            ($this->node_type == self::TYPE_REPOSITORY)
 
  293        $this->header_action->enableCopy(
false);
 
  294        $this->header_action->enableCut(
false);
 
  295        $this->header_action->enableDelete(
false);
 
  296        $this->header_action->enableLink(
false);
 
  297        $this->header_action->enableInfoscreen(
false);
 
  298        $this->header_action->enableTimings(
false);
 
  299        $this->header_action->enableSubscribe($this->node_type == self::TYPE_REPOSITORY);
 
  301        $this->header_action->initItem($this->node_id, $this->obj_id);
 
  302        $this->header_action->setHeaderSubObject($this->sub_type, $this->sub_id);
 
  303        $this->header_action->setAjaxHash($this->
getAjaxHash());
 
  305        return $this->header_action;
 
An exception for terminatinating execution or to throw for unit testing.
Class ilCommonActionDispatcherGUI.
static buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type=null, $a_sub_id=null)
Build ajax hash.
__construct($a_node_type, $a_access_handler, $a_obj_type, $a_node_id, $a_obj_id)
Constructor.
getAjaxHash()
Build ajax hash for current (object/node) properties.
setRatingCallback($a_gui, $a_cmd)
Add callback for rating gui.
initHeaderAction()
Set header action menu.
setSubObject($a_sub_obj_type, $a_sub_obj_id)
Set sub object attributes.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
$enable_comments_settings
enableCommentsSettings($a_value)
Toggle comments settings.
Class ilObjectActivationGUI.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
Access handler for personal workspace.
Tree handler for personal workspace.