39        function __construct($a_node_type, $a_access_handler, $a_obj_type, $a_node_id, $a_obj_id)
 
   41                $this->node_type = (int)$a_node_type;
 
   42                $this->access_handler = $a_access_handler;
 
   43                $this->obj_type = (string)$a_obj_type;
 
   44                $this->node_id = (int)$a_node_id;
 
   45                $this->obj_id = (int)$a_obj_id;         
 
   56                        $this->obj_id, $this->sub_type, $this->sub_id);
 
   70        static function buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type = 
null, $a_sub_id = 
null)
 
   72                return $a_node_type.
";".$a_node_id.
";".$a_obj_type.
";".
 
   73                        $a_obj_id.
";".$a_sub_type.
";".$a_sub_id;
 
   85                if(isset(
$_GET[
"cadh"]))
 
   87                        $parts = explode(
";", (
string)
$_GET[
"cadh"]);
 
   99                                        $access_handler = $ilAccess;
 
  103                                        include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
 
  105                                        include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
 
  124                                $dispatcher->enableCommentsSettings(
true);      
 
  136                if ($this->node_id && 
 
  137                        !$this->access_handler->checkAccess(
"visible", 
"", $this->node_id) &&
 
  138                        !$this->access_handler->checkAccess(
"read", 
"", $this->node_id))
 
  143                $next_class = 
$ilCtrl->getNextClass($this);
 
  146                $ilCtrl->saveParameter($this, 
"cadh");
 
  158                                include_once 
"Services/Notes/classes/class.ilNoteGUI.php";
 
  160                                $note_gui->enablePrivateNotes(
true);    
 
  162                                $has_write = $this->access_handler->checkAccess(
"write", 
"", $this->node_id);
 
  163                                if($has_write && 
$ilSetting->get(
"comments_del_tutor", 1))
 
  165                                        $note_gui->enablePublicNotesDeletion(
true);
 
  169                                if($this->enable_comments_settings)
 
  173                                                $this->access_handler->checkAccess(
"edit_permissions", 
"", $this->node_id))
 
  175                                                $note_gui->enableCommentsSettings();
 
  180                                else if($this->sub_id)
 
  182                                        $note_gui->enablePublicNotes(
true);
 
  185                                $ilCtrl->forwardCommand($note_gui);             
 
  189                                include_once 
"Services/Tagging/classes/class.ilTaggingGUI.php";
 
  191                                $tags_gui->setObject($this->obj_id, $this->obj_type);
 
  192                                $ilCtrl->forwardCommand($tags_gui);                                             
 
  195                        case "ilobjectactivationgui":
 
  196                                $ilCtrl->setParameter($this, 
"parent_id", (
int)$_REQUEST[
'parent_id']);
 
  197                                include_once 
'Services/Object/classes/class.ilObjectActivationGUI.php';                         
 
  199                                $ilCtrl->forwardCommand($act_gui);
 
  203                                include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
 
  207                                        $rating_gui->setObject($this->obj_id, $this->obj_type, $this->sub_id, $this->sub_type);
 
  212                                        $rating_gui->setObject($this->obj_id, $this->obj_type);
 
  214                                $ilCtrl->forwardCommand($rating_gui);
 
  215                                if($this->rating_callback)
 
  219                                        $ilCtrl->redirect($this->rating_callback[0], $this->rating_callback[1]);
 
  238                $this->sub_type = (string)$a_sub_obj_type;
 
  239                $this->sub_id = (int)$a_sub_obj_id;                     
 
  249                $this->enable_comments_settings = (bool)$a_value;
 
  260                $this->rating_callback = array($a_gui, $a_cmd);
 
  269                if ($this->node_id && 
 
  270                        !$this->access_handler->checkAccess(
"visible", 
"", $this->node_id) &&
 
  271                        !$this->access_handler->checkAccess(
"read", 
"", $this->node_id))
 
  276                include_once 
'Services/Object/classes/class.ilObjectListGUIFactory.php';
 
  279                        ($this->node_type == self::TYPE_REPOSITORY)
 
  285                $this->header_action->enableCopy(
false);
 
  286                $this->header_action->enableCut(
false);
 
  287                $this->header_action->enableDelete(
false);
 
  288                $this->header_action->enableLink(
false);
 
  289                $this->header_action->enableInfoscreen(
false);                          
 
  290                $this->header_action->enableTimings(
false);
 
  291                $this->header_action->enableSubscribe($this->node_type == self::TYPE_REPOSITORY);
 
  293                $this->header_action->initItem($this->node_id, $this->obj_id);                          
 
  294                $this->header_action->setHeaderSubObject($this->sub_type, $this->sub_id);               
 
  295                $this->header_action->setAjaxHash($this->
getAjaxHash());
 
  297                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.