当前位置: 首页>>代码示例>>PHP>>正文


PHP ilCommonActionDispatcherGUI::initHeaderAction方法代码示例

本文整理汇总了PHP中ilCommonActionDispatcherGUI::initHeaderAction方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCommonActionDispatcherGUI::initHeaderAction方法的具体用法?PHP ilCommonActionDispatcherGUI::initHeaderAction怎么用?PHP ilCommonActionDispatcherGUI::initHeaderAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilCommonActionDispatcherGUI的用法示例。


在下文中一共展示了ilCommonActionDispatcherGUI::initHeaderAction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initHeaderAction

 /**
  * Add header action menu
  * 
  * @param string $a_sub_type
  * @param int $a_sub_id
  * @return ilObjectListGUI
  */
 protected function initHeaderAction($a_sub_type = null, $a_sub_id = null)
 {
     global $ilAccess;
     if (!$this->creation_mode && $this->object) {
         include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
         $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $ilAccess, $this->object->getType(), $this->ref_id, $this->object->getId());
         $dispatcher->setSubObject($a_sub_type, $a_sub_id);
         include_once "Services/Object/classes/class.ilObjectListGUI.php";
         ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
         $lg = $dispatcher->initHeaderAction();
         if (is_object($lg)) {
             // to enable add to desktop / remove from desktop
             if ($this instanceof ilDesktopItemHandling) {
                 $lg->setContainerObject($this);
             }
             // enable multi download
             $lg->enableMultiDownload(true);
             // comments settings are always on (for the repository)
             // should only be shown if active or permission to toggle
             include_once "Services/Notes/classes/class.ilNote.php";
             if ($ilAccess->checkAccess("write", "", $this->ref_id) || $ilAccess->checkAccess("edit_permissions", "", $this->ref_id) || ilNote::commentsActivated($this->object->getId(), 0, $this->object->getType())) {
                 $lg->enableComments(true);
             }
             $lg->enableNotes(true);
             $lg->enableTags(true);
         }
         return $lg;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:36,代码来源:class.ilObjectGUI.php

示例2: addHeaderAction

 public function addHeaderAction($a_redraw = false)
 {
     global $ilUser, $ilAccess, $tpl, $lng, $ilCtrl;
     include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
     $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $ilAccess, "dcl", $this->ref_id, $this->obj_id);
     include_once "Services/Object/classes/class.ilObjectListGUI.php";
     ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true), $ilCtrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false), $ilCtrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
     $lg = $dispatcher->initHeaderAction();
     //$lg->enableNotes(true);
     //$lg->enableComments(ilObjWiki::_lookupPublicNotes($this->getPageObject()->getParentId()), false);
     // notification
     if ($ilUser->getId() != ANONYMOUS_USER_ID && $this->object->getNotification() == 1) {
         include_once "./Services/Notification/classes/class.ilNotification.php";
         if (ilNotification::hasNotification(ilNotification::TYPE_DATA_COLLECTION, $ilUser->getId(), $this->obj_id)) {
             //Command Activate Notification
             $ilCtrl->setParameter($this, "ntf", 1);
             $lg->addCustomCommand($ilCtrl->getLinkTarget($this, "toggleNotification"), "dcl_notification_deactivate_dcl");
             $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_on.png"), $lng->txt("dcl_notification_activated"));
         } else {
             //Command Deactivate Notification
             $ilCtrl->setParameter($this, "ntf", 2);
             $lg->addCustomCommand($ilCtrl->getLinkTarget($this, "toggleNotification"), "dcl_notification_activate_dcl");
             $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_off.png"), $lng->txt("dcl_notification_deactivated"));
         }
         $ilCtrl->setParameter($this, "ntf", "");
     }
     if (!$a_redraw) {
         $tpl->setHeaderActionMenu($lg->getHeaderAction());
     } else {
         return $lg->getHeaderAction();
     }
     $tpl->setHeaderActionMenu($lg->getHeaderAction());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:33,代码来源:class.ilObjDataCollectionGUI.php

示例3: addHeaderAction

 function addHeaderAction($a_redraw = false)
 {
     global $ilUser, $ilAccess;
     $wiki_id = $this->getPageObject()->getParentId();
     $page_id = $this->getPageObject()->getId();
     include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
     $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $ilAccess, "wiki", $_GET["ref_id"], $wiki_id);
     $dispatcher->setSubObject("wpg", $page_id);
     include_once "Services/Object/classes/class.ilObjectListGUI.php";
     ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
     $lg = $dispatcher->initHeaderAction();
     $lg->enableNotes(true);
     $lg->enableComments(ilObjWiki::_lookupPublicNotes($wiki_id), false);
     // rating
     if (ilObjWiki::_lookupRating($wiki_id) && $this->getPageObject()->getRating() && $this->getPageObject()->old_nr == 0) {
         $lg->enableRating(true, $this->lng->txt("wiki_rate_page"), ilObjWiki::_lookupRatingCategories($wiki_id), array("ilcommonactiondispatchergui", "ilratinggui"));
     }
     // notification
     if ($ilUser->getId() != ANONYMOUS_USER_ID) {
         include_once "./Services/Notification/classes/class.ilNotification.php";
         if (ilNotification::hasNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $wiki_id)) {
             $this->ctrl->setParameter($this, "ntf", 1);
             $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_wiki");
             $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_on.png"), $this->lng->txt("wiki_notification_activated"));
         } else {
             $this->ctrl->setParameter($this, "ntf", 2);
             $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_wiki");
             if (ilNotification::hasNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $page_id)) {
                 $this->ctrl->setParameter($this, "ntf", 3);
                 $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_deactivate_page");
                 $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_on.png"), $this->lng->txt("wiki_page_notification_activated"));
             } else {
                 $this->ctrl->setParameter($this, "ntf", 4);
                 $lg->addCustomCommand($this->ctrl->getLinkTarget($this), "wiki_notification_activate_page");
                 $lg->addHeaderIcon("not_icon", ilUtil::getImagePath("notification_off.png"), $this->lng->txt("wiki_notification_deactivated"));
             }
         }
         $this->ctrl->setParameter($this, "ntf", "");
     }
     if (!$a_redraw) {
         $this->tpl->setHeaderActionMenu($lg->getHeaderAction());
     } else {
         return $lg->getHeaderAction();
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:45,代码来源:class.ilWikiPageGUI.php

示例4: initHeaderAction

 /**
  * Add header action menu
  * 
  * @param string $a_sub_type
  * @param int $a_sub_id
  * @return ilObjectListGUI
  */
 protected function initHeaderAction($a_sub_type = null, $a_sub_id = null)
 {
     global $ilAccess;
     if ($this->id_type == self::WORKSPACE_NODE_ID) {
         if (!$this->creation_mode && $this->object_id) {
             include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
             $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_WORKSPACE, $this->getAccessHandler(), $this->getType(), $this->node_id, $this->object_id);
             $dispatcher->setSubObject($a_sub_type, $a_sub_id);
             include_once "Services/Object/classes/class.ilObjectListGUI.php";
             ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
             $lg = $dispatcher->initHeaderAction();
             if (is_object($lg)) {
                 // to enable add to desktop / remove from desktop
                 if ($this instanceof ilDesktopItemHandling) {
                     $lg->setContainerObject($this);
                 }
                 // for activation checks see ilObjectGUI
                 // $lg->enableComments(true);
                 $lg->enableNotes(true);
                 // $lg->enableTags(true);
             }
             return $lg;
         }
     } else {
         return parent::initHeaderAction();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:34,代码来源:class.ilObject2GUI.php

示例5: addHeaderAction

 /**
  * Add header action
  */
 function addHeaderAction($a_redraw = false)
 {
     global $ilAccess, $tpl;
     include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
     $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $ilAccess, $this->lm->getType(), $_GET["ref_id"], $this->lm->getId());
     $dispatcher->setSubObject("pg", $this->getCurrentPageId());
     include_once "Services/Object/classes/class.ilObjectListGUI.php";
     ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
     $lg = $dispatcher->initHeaderAction();
     $lg->enableNotes(true);
     $lg->enableComments($this->lm->publicNotes(), false);
     if ($this->lm->hasRating()) {
         $lg->enableRating(true, $this->lng->txt("lm_rating"), false, array("ilcommonactiondispatchergui", "ilratinggui"));
     }
     if (!$a_redraw) {
         $this->tpl->setVariable("HEAD_ACTION", $lg->getHeaderAction());
     } else {
         // we need to add onload code manually (rating, comments, etc.)
         return $lg->getHeaderAction() . $tpl->getOnLoadCodeForAsynch();
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:24,代码来源:class.ilLMPresentationGUI.php

示例6: addHeaderAction

 /**
  * Add header action
  */
 function addHeaderAction($a_redraw = false)
 {
     global $ilUser, $ilAccess;
     include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
     $dispatcher = new ilCommonActionDispatcherGUI(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $ilAccess, $this->lm->getType(), $_GET["ref_id"], $this->lm->getId());
     $dispatcher->setSubObject("pg", $this->getCurrentPageId());
     include_once "Services/Object/classes/class.ilObjectListGUI.php";
     ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this, "redrawHeaderAction", "", true), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false), $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false));
     $lg = $dispatcher->initHeaderAction();
     $lg->enableNotes(true);
     $lg->enableComments($this->lm->publicNotes(), false);
     if (!$a_redraw) {
         $this->tpl->setVariable("HEAD_ACTION", $lg->getHeaderAction());
     } else {
         return $lg->getHeaderAction();
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:20,代码来源:class.ilLMPresentationGUI.php


注:本文中的ilCommonActionDispatcherGUI::initHeaderAction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。