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


PHP ilObject::_lookupOwnerName方法代码示例

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


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

示例1: getOwnerName

 function getOwnerName()
 {
     return ilObject::_lookupOwnerName($this->getOwner());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:4,代码来源:class.ilObject.php

示例2: showTargets


//.........这里部分代码省略.........
                                     }
                                     // for references, get original title
                                     // (link will lead to orignal, which basically is wrong though)
                                     if ($a_obj_type == "crsr" || $a_obj_type == "catr") {
                                         include_once "Services/ContainerReference/classes/class.ilContainerReference.php";
                                         $tgt_obj_id = ilContainerReference::_lookupTargetId($a_rep_obj_id);
                                         $title = ilObject::_lookupTitle($tgt_obj_id);
                                     } else {
                                         $title = ilObject::_lookupTitle($a_rep_obj_id);
                                     }
                                     $this->item_list_gui[$type]->initItem($vis_ref_id, $a_rep_obj_id, $title);
                                     $link = $this->item_list_gui[$type]->getCommandLink("infoScreen");
                                     // workaround, because # anchor can't be passed through frameset
                                     $link = ilUtil::appendUrlParameterString($link, "anchor=note_" . $a_note_id);
                                     $link = $this->item_list_gui[$type]->appendRepositoryFrameParameter($link) . "#note_" . $a_note_id;
                                 } else {
                                     $title = ilObject::_lookupTitle($a_rep_obj_id);
                                     $link = "goto.php?target=pg_" . $a_obj_id . "_" . $vis_ref_id;
                                 }
                             }
                         }
                         $par_id = $tree->getParentId($vis_ref_id);
                         // sub object link
                         if ($sub_link != "") {
                             if ($this->export_html || $this->print) {
                                 $tpl->setCurrentBlock("exp_target_sub_object");
                             } else {
                                 $tpl->setCurrentBlock("target_sub_object");
                                 $tpl->setVariable("LINK_SUB_TARGET", $sub_link);
                             }
                             $tpl->setVariable("TXT_SUB_TARGET", $sub_title);
                             $tpl->setVariable("IMG_SUB_TARGET", $sub_icon);
                             $tpl->parseCurrentBlock();
                         }
                         // container and object link
                         if ($this->export_html || $this->print) {
                             $tpl->setCurrentBlock("exp_target_object");
                         } else {
                             $tpl->setCurrentBlock("target_object");
                             $tpl->setVariable("LINK_TARGET", $link);
                         }
                         $tpl->setVariable("TXT_CONTAINER", ilObject::_lookupTitle(ilObject::_lookupObjId($par_id)));
                         $tpl->setVariable("IMG_CONTAINER", ilObject::_getIcon(ilObject::_lookupObjId($par_id), "tiny"));
                         $tpl->setVariable("TXT_TARGET", $title);
                         $tpl->setVariable("IMG_TARGET", ilObject::_getIcon($a_rep_obj_id, "tiny"));
                         $tpl->parseCurrentBlock();
                     }
                     $tpl->touchBlock("target_objects");
                 }
             } else {
                 // we only need 1 instance
                 if (!$this->wsp_tree) {
                     include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
                     include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
                     $this->wsp_tree = new ilWorkspaceTree($ilUser->getId());
                     $this->wsp_access_handler = new ilWorkspaceAccessHandler($this->wsp_tree);
                 }
                 $node_id = $this->wsp_tree->lookupNodeId($a_rep_obj_id);
                 if ($this->wsp_access_handler->checkAccess("visible", "", $node_id)) {
                     $path = $this->wsp_tree->getPathFull($node_id);
                     if ($path) {
                         $item = array_pop($path);
                         $parent = array_pop($path);
                         if (!$parent["title"]) {
                             $parent["title"] = $this->lng->txt("wsp_personal_workspace");
                         }
                         // sub-objects
                         $additional = null;
                         if ($a_obj_id) {
                             $sub_title = $this->getSubObjectTitle($a_rep_obj_id, $a_obj_id);
                             if ($sub_title) {
                                 $item["title"] .= " (" . $sub_title . ")";
                                 $additional = "_" . $a_obj_id;
                             }
                         }
                         $link = ilWorkspaceAccessHandler::getGotoLink($node_id, $a_rep_obj_id, $additional);
                     } else {
                         $owner = ilObject::_lookupOwner($a_rep_obj_id);
                         $parent["title"] = $this->lng->txt("wsp_tab_shared") . " (" . ilObject::_lookupOwnerName($owner) . ")";
                         $item["title"] = ilObject::_lookupTitle($a_rep_obj_id);
                         $link = "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace&dsh=" . $owner;
                     }
                     // container and object link
                     if ($this->export_html || $this->print) {
                         $tpl->setCurrentBlock("exp_target_object");
                     } else {
                         $tpl->setCurrentBlock("target_object");
                         $tpl->setVariable("LINK_TARGET", $link);
                     }
                     // :TODO: no images in template ?
                     $tpl->setVariable("TXT_CONTAINER", $parent["title"]);
                     $tpl->setVariable("IMG_CONTAINER", ilObject::_getIcon($parent["obj_id"], "tiny"));
                     $tpl->setVariable("TXT_TARGET", $item["title"]);
                     $tpl->setVariable("IMG_TARGET", ilObject::_getIcon($a_rep_obj_id, "tiny"));
                     $tpl->parseCurrentBlock();
                 }
             }
         }
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilNoteGUI.php

示例3:

 final function _lookupOwnerName($a_owner_id)
 {
     return parent::_lookupOwnerName($a_owner_id);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:4,代码来源:class.ilObject2.php

示例4: testSetGetLookup

 public function testSetGetLookup()
 {
     global $ilUser;
     $obj = new ilObject();
     $obj->setType("");
     // otherwise type check will fail
     $obj->setTitle("TestObject");
     $obj->setDescription("TestDescription");
     $obj->setImportId("imp_44");
     $obj->create();
     $obj->createReference();
     $id = $obj->getId();
     $ref_id = $obj->getRefId();
     $obj = new ilObject($id, false);
     if ($obj->getType() == "") {
         $value .= "sg1-";
     }
     if ($obj->getTitle() == "TestObject") {
         $value .= "sg2-";
     }
     if ($obj->getDescription() == "TestDescription") {
         $value .= "sg3-";
     }
     if ($obj->getImportId() == "imp_44") {
         $value .= "sg4-";
     }
     if ($obj->getOwner() == $ilUser->getId()) {
         $value .= "sg5-";
     }
     $obj = new ilObject($ref_id);
     if ($obj->getTitle() == "TestObject") {
         $value .= "sg6-";
     }
     if ($obj->getCreateDate() == ($lu = $obj->getLastUpdateDate())) {
         $value .= "sg7-";
     }
     $obj->setTitle("TestObject2");
     sleep(2);
     // we want a different date here...
     $obj->update();
     $obj = new ilObject($ref_id);
     if ($lu != ($lu2 = $obj->getLastUpdateDate())) {
         $value .= "up1-";
     }
     if ($obj->getTitle() == "TestObject2") {
         $value .= "up2-";
     }
     if ($id == ilObject::_lookupObjIdByImportId("imp_44")) {
         $value .= "lu1-";
     }
     if ($ilUser->getFullname() == ilObject::_lookupOwnerName(ilObject::_lookupOwner($id))) {
         $value .= "lu2-";
     }
     if (ilObject::_lookupTitle($id) == "TestObject2") {
         $value .= "lu3-";
     }
     if (ilObject::_lookupDescription($id) == "TestDescription") {
         $value .= "lu4-";
     }
     if (ilObject::_lookupLastUpdate($id) == $lu2) {
         $value .= "lu5-";
     }
     if (ilObject::_lookupObjId($ref_id) == $id) {
         $value .= "lu6-";
     }
     if (ilObject::_lookupType($id) == "") {
         $value .= "lu7-";
     }
     if (ilObject::_lookupObjectId($ref_id) == $id) {
         $value .= "lu8-";
     }
     $ar = ilObject::_getAllReferences($id);
     if (is_array($ar) && count($ar) == 1 && $ar[$ref_id] == $ref_id) {
         $value .= "lu9-";
     }
     $ids = ilObject::_getIdsForTitle("TestObject2");
     foreach ($ids as $i) {
         if ($i == $id) {
             $value .= "lu10-";
         }
     }
     $obs = ilObject::_getObjectsByType("usr");
     foreach ($obs as $ob) {
         if ($ob["obj_id"] == $ilUser->getId()) {
             $value .= "lu11-";
         }
     }
     $d1 = ilObject::_lookupDeletedDate($ref_id);
     ilObject::_setDeletedDate($ref_id);
     $d2 = ilObject::_lookupDeletedDate($ref_id);
     ilObject::_resetDeletedDate($ref_id);
     $d3 = ilObject::_lookupDeletedDate($ref_id);
     if ($d1 != $d2 && $d1 == $d3 && $d3 == null) {
         $value .= "dd1-";
     }
     $obj->delete();
     $this->assertEquals("sg1-sg2-sg3-sg4-sg5-sg6-sg7-up1-up2-" . "lu1-lu2-lu3-lu4-lu5-lu6-lu7-lu8-lu9-lu10-lu11-dd1-", $value);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:98,代码来源:ilObjectTest.php


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