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


PHP ilCommonActionDispatcherGUI::buildAjaxHash方法代码示例

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


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

示例1: getCommentsAjaxLink

 /**
  * @description Get the ajax link for displaying the comments in the right panel (to be wrapped in an onclick attr)
  *
  * @param int $recordId Record-ID
  *
  * @return string
  */
 protected function getCommentsAjaxLink($recordId)
 {
     $ajax_hash = ilCommonActionDispatcherGUI::buildAjaxHash(1, $_GET['ref_id'], 'dcl', $this->parent_obj->obj_id, 'dcl', $recordId);
     return ilNoteGUI::getListCommentsJSCall($ajax_hash, '');
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:12,代码来源:class.ilDataCollectionRecordListTableGUI.php

示例2: getStandardFieldHTML

 /**
  * @param string $field_id
  * @param array  $options
  *
  * @return array|string
  */
 private function getStandardFieldHTML($field_id, array $options = array())
 {
     switch ($field_id) {
         case 'id':
             return $this->getId();
         case 'owner':
             return ilUserUtil::getNamePresentation($this->getOwner());
         case 'last_edit_by':
             return ilUserUtil::getNamePresentation($this->getLastEditBy());
         case 'last_update':
             return ilDatePresentation::formatDate(new ilDateTime($this->getLastUpdate(), IL_CAL_DATETIME));
         case 'create_date':
             return ilDatePresentation::formatDate(new ilDateTime($this->getCreateDate(), IL_CAL_DATETIME));
         case 'comments':
             $nComments = count($this->getComments());
             $ajax_hash = ilCommonActionDispatcherGUI::buildAjaxHash(1, $_GET['ref_id'], 'dcl', $this->table->getCollectionObject()->getId(), 'dcl', $this->getId());
             $ajax_link = ilNoteGUI::getListCommentsJSCall($ajax_hash, '');
             return "<a class='dcl_comment' href='#' onclick=\"return " . $ajax_link . "\">\n                        <img src='" . ilUtil::getImagePath("comment_unlabeled.svg") . "' alt='{$nComments} Comments'><span class='ilHActProp'>{$nComments}</span></a>";
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:26,代码来源:class.ilDataCollectionRecord.php

示例3: getListItemHTML

 /**
  * Get all item information (title, commands, description) in HTML
  *
  * @access	public
  * @param	int			$a_ref_id		item reference id
  * @param	int			$a_obj_id		item object id
  * @param	int			$a_title		item title
  * @param	int			$a_description	item description
  * @param	bool		$a_use_asynch
  * @param	bool		$a_get_asynch_commands
  * @param	string		$a_asynch_url
  * @param	bool		$a_context	    workspace/tree context
  * @return	string		html code
  */
 function getListItemHTML($a_ref_id, $a_obj_id, $a_title, $a_description, $a_use_asynch = false, $a_get_asynch_commands = false, $a_asynch_url = "", $a_context = self::CONTEXT_REPOSITORY)
 {
     global $ilAccess, $ilBench, $ilUser, $ilCtrl;
     // this variable stores wheter any admin commands
     // are included in the output
     $this->adm_commands_included = false;
     // only for permformance exploration
     $type = ilObject::_lookupType($a_obj_id);
     // initialization
     $ilBench->start("ilObjectListGUI", "1000_getListHTML_init{$type}");
     $this->initItem($a_ref_id, $a_obj_id, $a_title, $a_description, $a_context);
     $ilBench->stop("ilObjectListGUI", "1000_getListHTML_init{$type}");
     // prepare ajax calls
     include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
     if ($a_context == self::CONTEXT_REPOSITORY) {
         $node_type = ilCommonActionDispatcherGUI::TYPE_REPOSITORY;
     } else {
         $node_type = ilCommonActionDispatcherGUI::TYPE_WORKSPACE;
     }
     $this->setAjaxHash(ilCommonActionDispatcherGUI::buildAjaxHash($node_type, $a_ref_id, $type, $a_obj_id));
     if ($a_use_asynch && $a_get_asynch_commands) {
         return $this->insertCommands(true, true);
     }
     if ($this->rating_enabled) {
         if (ilRating::hasRatingInListGUI($this->obj_id, $this->type)) {
             $may_rate = $this->checkCommandAccess("read", "", $this->ref_id, $this->type);
             $rating = new ilRatingGUI();
             $rating->setObject($this->obj_id, $this->type);
             /*				$this->addCustomProperty(
             					$this->lng->txt("rating_average_rating"),
             					$rating->getListGUIProperty($this->ref_id, $may_rate, $this->ajax_hash, $this->parent_ref_id),
             					false,
             					true
             				);*/
             $this->addCustomProperty("", $rating->getListGUIProperty($this->ref_id, $may_rate, $this->ajax_hash, $this->parent_ref_id), false, true);
         }
     }
     // read from cache
     include_once "Services/Object/classes/class.ilListItemAccessCache.php";
     $this->acache = new ilListItemAccessCache();
     $cres = $this->acache->getEntry($ilUser->getId() . ":" . $a_ref_id);
     if ($this->acache->getLastAccessStatus() == "hit") {
         $this->access_cache = unserialize($cres);
     } else {
         // write to cache
         $this->storeAccessCache();
     }
     // visible check
     if (!$this->checkCommandAccess("visible", "", $a_ref_id, "", $a_obj_id)) {
         $ilBench->stop("ilObjectListGUI", "2000_getListHTML_check_visible");
         $this->resetCustomData();
         return "";
     }
     // BEGIN WEBDAV
     if ($type == 'file' and ilObjFileAccess::_isFileHidden($a_title)) {
         $this->resetCustomData();
         return "";
     }
     // END WEBDAV
     $this->tpl = new ilTemplate("tpl.container_list_item.html", true, true, "Services/Container", "DEFAULT", false, true);
     if ($this->getCommandsStatus() || $this->payment_enabled && IS_PAYMENT_ENABLED) {
         if (!$this->getSeparateCommands()) {
             $this->tpl->setVariable("COMMAND_SELECTION_LIST", $this->insertCommands($a_use_asynch, $a_get_asynch_commands, $a_asynch_url));
         }
     }
     if ($this->getProgressInfoStatus()) {
         $this->insertProgressInfo();
     }
     // insert title and describtion
     $this->insertTitle();
     if (!$this->isMode(IL_LIST_AS_TRIGGER)) {
         if ($this->getDescriptionStatus()) {
             $this->insertDescription();
         }
     }
     if ($this->getSearchFragmentStatus()) {
         $this->insertSearchFragment();
     }
     if ($this->enabledRelevance()) {
         $this->insertRelevance();
     }
     // properties
     $ilBench->start("ilObjectListGUI", "6000_insert_properties{$type}");
     if ($this->getPropertiesStatus()) {
         $this->insertProperties();
     }
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjectListGUI.php

示例4: commentJSCall

 /**
  * Builds JavaScript Call to open CommentLayer via html link
  *
  * @return string jsCall
  */
 private function commentJSCall()
 {
     include_once "./Services/Notes/classes/class.ilNoteGUI.php";
     include_once "./Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
     $refId = $this->getRefId();
     $objectId = ilObject2::_lookupObjectId($refId);
     $ajaxHash = ilCommonActionDispatcherGUI::buildAjaxHash(ilCommonActionDispatcherGUI::TYPE_REPOSITORY, $refId, "poll", $objectId);
     $comment = new ilNoteGUI();
     $jsCall = $comment->getListCommentsJSCall($ajaxHash, "ilPoll.redrawComments(" . $refId . ");");
     return $jsCall;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilPollBlockGUI.php


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