• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilLink类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: handleCode

 /**
  * Handle target parameter
  * @param object $a_target
  * @return 
  */
 public static function handleCode($a_ref_id, $a_type, $a_code)
 {
     global $lng, $tree, $ilUser;
     include_once './Services/Link/classes/class.ilLink.php';
     $lng->loadLanguageModule($a_type);
     try {
         self::useCode($a_code, $a_ref_id);
         $title = ilObject::_lookupTitle(ilObject::_lookupObjectId($a_ref_id));
         ilUtil::sendSuccess(sprintf($lng->txt($a_type . "_admission_link_success_registration"), $title), true);
         ilUtil::redirect(ilLink::_getLink($a_ref_id));
     } catch (ilMembershipRegistrationException $e) {
         switch ($e->getCode()) {
             case 124:
                 //added to waiting list
                 ilUtil::sendSuccess($e->getMessage(), true);
                 break;
             case 123:
                 //object is full
                 ilUtil::sendFailure($lng->txt($a_type . "_admission_link_failure_membership_limited"), true);
                 break;
             case 789:
                 //out of registration period
                 ilUtil::sendFailure($lng->txt($a_type . "_admission_link_failure_registration_period"), true);
                 break;
             default:
                 ilUtil::sendFailure($e->getMessage(), true);
                 break;
         }
         $GLOBALS['ilLog']->logStack();
         $GLOBALS['ilLog']->write($e->getCode() . ': ' . $e->getMessage());
         $parent_id = $tree->getParentId($a_ref_id);
         ilUtil::redirect(ilLink::_getLink($parent_id));
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilMembershipRegistrationCodeUtils.php


示例2: getHTML

 /**
  * get html 
  * @return
  */
 public function getHTML()
 {
     global $lng;
     $lng->loadLanguageModule('content');
     foreach ($this->getSubItemIds(true) as $sub_item) {
         if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
             $this->tpl->setCurrentBlock('sea_fragment');
             $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock('subitem');
         $this->tpl->setVariable('SEPERATOR', ':');
         include_once './Modules/MediaPool/classes/class.ilMediaPoolItem.php';
         switch (ilMediaPoolItem::lookupType($sub_item)) {
             case 'fold':
                 $this->tpl->setVariable('LINK', ilLink::_getLink($this->getRefId(), 'mep', array(), '_' . $sub_item));
                 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame(''));
                 break;
             case 'mob':
                 $this->tpl->setVariable('LINK', $this->getItemListGUI()->getCommandLink('allMedia') . '&force_filter=' . $sub_item);
                 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame(''));
                 break;
             default:
         }
         $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('obj_' . ilMediaPoolItem::lookupType($sub_item)));
         $this->tpl->setVariable('TITLE', ilMediaPoolItem::lookupTitle($sub_item));
         $this->tpl->parseCurrentBlock();
     }
     $this->showDetailsLink();
     return $this->tpl->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:35,代码来源:class.ilObjMediaPoolSubItemListGUI.php


示例3: getHTML

 /**
  * get html 
  * @return
  */
 public function getHTML()
 {
     global $lng;
     $lng->loadLanguageModule('webr');
     foreach ($this->getSubItemIds(true) as $sub_item) {
         if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
             $this->tpl->setCurrentBlock('sea_fragment');
             $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock('subitem');
         $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('webr'));
         $this->tpl->setVariable('SEPERATOR', ':');
         $link_data = ilLinkResourceItems::lookupItem($this->getObjId(), $sub_item);
         $link_data = ilParameterAppender::_append($link_data);
         // handle internal links (#10620)
         if (stristr($link_data["target"], "|")) {
             $parts = explode("|", $link_data["target"]);
             if ($parts[0] == "page") {
                 $parts[0] = "pg";
             }
             if ($parts[0] == "term") {
                 $parts[0] = "git";
             }
             $link_data["target"] = ilLink::_getStaticLink($parts[1], $parts[0]);
         }
         #$this->getItemListGUI()->setChildId($sub_item);
         $this->tpl->setVariable('LINK', $link_data['target']);
         $this->tpl->setVariable('TARGET', '_blank');
         $this->tpl->setVariable('TITLE', $link_data['title']);
         $this->tpl->parseCurrentBlock();
     }
     $this->showDetailsLink();
     return $this->tpl->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:39,代码来源:class.ilObjLinkResourceSubItemListGUI.php


示例4: getHTML

 /**
  * get html 
  * @return
  */
 public function getHTML()
 {
     global $lng, $ilUser;
     $lng->loadLanguageModule('content');
     foreach ($this->getSubItemIds(true) as $sub_item) {
         if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
             $this->tpl->setCurrentBlock('sea_fragment');
             $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock('subitem');
         $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('cont_term'));
         $this->tpl->setVariable('SEPERATOR', ':');
         #$this->getItemListGUI()->setChildId($sub_item);
         include_once './Services/Search/classes/class.ilUserSearchCache.php';
         $src_string = ilUserSearchCache::_getInstance($ilUser->getId())->getUrlEncodedQuery();
         $this->tpl->setVariable('LINK', ilLink::_getLink($this->getRefId(), 'git', array('target' => 'git_' . $sub_item . '_' . $this->getRefId(), 'srcstring' => 1)));
         $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame(''));
         $this->tpl->setVariable('TITLE', ilGlossaryTerm::_lookGlossaryTerm($sub_item));
         // begin-patch mime_filter
         if (count($this->getSubItemIds(true)) > 1) {
             $this->parseRelevance($sub_item);
         }
         // end-patch mime_filter
         $this->tpl->parseCurrentBlock();
     }
     $this->showDetailsLink();
     return $this->tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.ilObjGlossarySubItemListGUI.php


示例5: fillRow

 /**
  * Fill a single data row.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl;
     if ($a_set["img"] == ilObjectPermissionStatusGUI::IMG_OK) {
         $img_path = ilUtil::getImagePath("icon_ok.svg");
         $img_info = $lng->txt("info_assigned");
     } else {
         $img_path = ilUtil::getImagePath("icon_not_ok.svg");
         $img_info = $lng->txt("info_not_assigned");
     }
     $this->tpl->setVariable("IMG_PATH", $img_path);
     $this->tpl->setVariable("IMG_INFO", $img_info);
     $link = $ilCtrl->getLinkTargetByClass(array(ilpermissiongui), 'perm', '', true);
     $this->tpl->setVariable("ROLE_LINK", $link);
     $this->tpl->setVariable("TXT_ROLE", $a_set["role"]);
     if ($a_set["effective_from"] != "") {
         $this->tpl->setCurrentBlock("effective_from");
         $this->tpl->setVariable("EFFECTIVE_FROM_LINK", ilLink::_getLink($a_set["effective_from_ref_id"]));
         $this->tpl->setVariable("TXT_EFFECTIVE_FROM", $a_set["effective_from"]);
         $this->tpl->parseCurrentBlock();
     }
     if ($a_set["original_position_ref_id"] !== false) {
         $this->tpl->setCurrentBlock("original_position_with_link");
         $this->tpl->setVariable("TXT_ORIGINAL_POSITION_WITH_LINK", $a_set["original_position"]);
         $this->tpl->setVariable("ORIGINAL_POSITION_LINK", ilLink::_getLink($a_set["original_position_ref_id"]));
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->setVariable("TXT_ORIGINAL_POSITION", $a_set["original_position"]);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.ilAvailableRolesStatusTableGUI.php


示例6: fillRow

 /**
  * Fill row template
  * @param array $a_row
  */
 public function fillRow($a_row)
 {
     global $ilCtrl;
     $this->tpl->setVariable('OBJ_SRC', $a_row['icon']);
     $this->tpl->setVariable('OBJ_ALT', $a_row['icon_alt']);
     $this->tpl->setVariable('OBJ_TITLE', $a_row['title']);
     include_once './Services/Link/classes/class.ilLink.php';
     $this->tpl->setVariable('OBJ_LINK', ilLink::_getLink($a_row['ref_id'], $a_row['type']));
     $this->tpl->setVariable('OBJ_DESCRIPTION', $a_row['description']);
     $this->tpl->setVariable('COND_ID', $a_row['id']);
     $this->tpl->setVariable('OBJ_CONDITION', $a_row['condition']);
     if (!$this->enable_editing) {
         $this->tpl->setCurrentBlock("obligatory_static");
         $this->tpl->setVariable('OBL_SRC', ilUtil::getImagePath($a_row['obligatory'] ? 'icon_ok.svg' : 'icon_not_ok.svg'));
         $this->tpl->setVariable('OBL_ALT', $this->lng->txt($a_row['obligatory'] ? 'precondition_obligatory_alt' : 'precondition_not_obligatory_alt'));
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->setCurrentBlock("obligatory_edit");
         $this->tpl->setVariable('OBL_ID', $a_row['id']);
         $this->tpl->setVariable('OBL_STATUS', $a_row['obligatory'] ? ' checked="checked"' : '');
         $this->tpl->parseCurrentBlock();
     }
     $ilCtrl->setParameterByClass(get_class($this->getParentObject()), 'condition_id', $a_row['id']);
     $this->tpl->setVariable('EDIT_LINK', $ilCtrl->getLinkTargetByClass(get_class($this->getParentObject()), 'edit'));
     $this->tpl->setVariable('TXT_EDIT', $this->lng->txt('edit'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilConditionHandlerTableGUI.php


示例7: fillRow

 public function fillRow($set)
 {
     include_once './Services/Link/classes/class.ilLink.php';
     $this->tpl->setVariable('OBJ_LINK', ilLink::_getLink($set['ref_id'], $set['type']));
     $this->tpl->setVariable('OBJ_LINKED_TITLE', $set['title']);
     $this->tpl->setVariable('TYPE_IMG', ilUtil::getTypeIconPath($set['type'], $set['obj_id']));
     $this->tpl->setVariable('TYPE_STR', $this->lng->txt('obj_' . $set['type']));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilObjectTableGUI.php


示例8: fillRow

 /**
  * Fill row
  *
  * @access public
  * @param array row data
  * 
  */
 public function fillRow($a_set)
 {
     include_once './Services/Link/classes/class.ilLink.php';
     $this->tpl->setVariable('VAL_TITLE', $a_set['title']);
     $this->tpl->setVariable('VAL_LINK', ilLink::_getLink($a_set['ref_id'], 'rcrs'));
     $this->tpl->setVariable('VAL_DESC', $a_set['desc']);
     $this->tpl->setVariable('VAL_REMOTE', $a_set['from']);
     $this->tpl->setVariable('VAL_REMOTE_INFO', $a_set['from_info']);
     $this->tpl->setVariable('TXT_EMAIL', $this->lng->txt('ecs_email'));
     $this->tpl->setVariable('TXT_DNS', $this->lng->txt('ecs_dns'));
     $this->tpl->setVariable('TXT_ABR', $this->lng->txt('ecs_abr'));
     $this->tpl->setVariable('VAL_LAST_UPDATE', $a_set['last_update']);
     $this->tpl->setVariable('TXT_TERM', $this->lng->txt('ecs_field_term'));
     $this->tpl->setVariable('TXT_CRS_TYPE', $this->lng->txt('ecs_field_courseType'));
     $this->tpl->setVariable('TXT_CRS_ID', $this->lng->txt('ecs_field_courseID'));
     $this->tpl->setVariable('TXT_CREDITS', $this->lng->txt('ecs_field_credits'));
     $this->tpl->setVariable('TXT_ROOM', $this->lng->txt('ecs_field_room'));
     $this->tpl->setVariable('TXT_CYCLE', $this->lng->txt('ecs_field_cycle'));
     $this->tpl->setVariable('TXT_SWS', $this->lng->txt('ecs_field_semester_hours'));
     $this->tpl->setVariable('TXT_START', $this->lng->txt('ecs_field_begin'));
     $this->tpl->setVariable('TXT_END', $this->lng->txt('ecs_field_end'));
     $this->tpl->setVariable('TXT_LECTURER', $this->lng->txt('ecs_field_lecturer'));
     $sid = array_pop($a_set['sids']);
     include_once './Services/WebServices/ECS/classes/class.ilECSDataMappingSettings.php';
     $settings = ilECSDataMappingSettings::getInstanceByServerId($sid);
     include_once "Services/WebServices/ECS/classes/class.ilECSUtils.php";
     $values = ilECSUtils::getAdvancedMDValuesForObjId($a_set['obj_id']);
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'lecturer')) {
         $this->tpl->setVariable('VAL_LECTURER', isset($values[$field]) ? $values[$field] : '--');
     }
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'term')) {
         $this->tpl->setVariable('VAL_TERM', isset($values[$field]) ? $values[$field] : '--');
     }
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'courseID')) {
         $this->tpl->setVariable('VAL_CRS_ID', isset($values[$field]) ? $values[$field] : '--');
     }
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'courseType')) {
         $this->tpl->setVariable('VAL_CRS_TYPE', isset($values[$field]) ? $values[$field] : '--');
     }
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'credits')) {
         $this->tpl->setVariable('VAL_CREDITS', isset($values[$field]) ? $values[$field] : '--');
     }
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'semester_hours')) {
         $this->tpl->setVariable('VAL_SWS', isset($values[$field]) ? $values[$field] : '--');
     }
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'room')) {
         $this->tpl->setVariable('VAL_ROOM', isset($values[$field]) ? $values[$field] : '--');
     }
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'cycle')) {
         $this->tpl->setVariable('VAL_CYCLE', isset($values[$field]) ? $values[$field] : '--');
     }
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'begin')) {
         $this->tpl->setVariable('VAL_START', isset($values[$field]) ? ilDatePresentation::formatDate(new ilDateTime($values[$field], IL_CAL_UNIX)) : '--');
     }
     if ($field = $settings->getMappingByECSName(ilECSDataMappingSetting::MAPPING_EXPORT, 'end')) {
         $this->tpl->setVariable('VAL_END', isset($values[$field]) ? ilDatePresentation::formatDate(new ilDateTime($values[$field], IL_CAL_UNIX)) : '--');
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:65,代码来源:class.ilECSReleasedContentTableGUI.php


示例9: fillRow

 /**
  * @param array $row
  */
 public function fillRow(array $row)
 {
     /**
      * @var $ilAccess ilAccessHandler
      */
     global $ilAccess;
     $this->tpl->setVariable('USAGE_INSTANCE_TITLE', $row['title']);
     $this->tpl->setVariable('USAGE_AUTHOR', $row['author']);
     $this->tpl->setVariable('USAGE_PATH', $row['path']);
     if ($ilAccess->checkAccess('read', '', $row['ref_id']) && !$row['is_trashed']) {
         $link = new ilLink();
         $this->tpl->setVariable('USAGE_INSTANCE_LINKTED_TITLE', $row['title']);
         $this->tpl->setVariable('USAGE_INSTANCE_HREF', $link->_getStaticLink($row['ref_id'], 'tst'));
         $this->tpl->setCurrentBlock('linked_title_b');
         $this->tpl->touchBlock('linked_title_b');
         $this->tpl->parseCurrentBlock();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:21,代码来源:class.ilQuestionUsagesTableGUI.php


示例10: createMailSignature

 /**
  * Create a course mail signature
  * @return 
  */
 protected function createMailSignature()
 {
     $GLOBALS['lng']->loadLanguageModule($this->getCurrentObject()->object->getType());
     $link = chr(13) . chr(10) . chr(13) . chr(10);
     $link .= $this->lng->txt($this->getCurrentObject()->object->getType() . '_mail_permanent_link');
     $link .= chr(13) . chr(10) . chr(13) . chr(10);
     include_once 'Services/Link/classes/class.ilLink.php';
     $link .= ilLink::_getLink($this->getCurrentObject()->object->getRefId());
     return rawurlencode(base64_encode($link));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:14,代码来源:class.ilMembershipGUI.php


示例11: modifyGUI

 function modifyGUI($a_comp, $a_part, $a_par = array())
 {
     global $ilSetting;
     if (!$ilSetting->get('enable_trash')) {
         return "";
     }
     if ($a_part == "tabs") {
         // $a_par["tabs"] is ilTabsGUI object
         global $ilias, $tree, $lng, $ilCtrl, $ilUser;
         if ($ilUser->login == 'anonymous') {
             return "";
         }
         $ref_id = (int) $_GET['ref_id'];
         if ($ref_id == 0) {
             return "";
         }
         if ($_GET['baseClass'] == 'ilMailGUI' and (int) $_GET['mail_id'] != 0 or $_GET['cmd'] == 'mailUser' or $_GET['cmdClass'] == 'ilmailformgui' or $_GET['ref'] == 'mail') {
             //we are in emails
             return "";
         }
         if ($_GET['baseClass'] == 'ilPersonalDesktopGUI' and (int) $_GET['wsp_id'] != 0) {
             //we are in arbeitsraum
             return "";
         }
         global $rbacsystem;
         //if($rbacsystem->checkAccess('edit_permission',$ref_id)){
         try {
             if ($rbacsystem->checkAccess('create_file', $ref_id)) {
                 $objects = $tree->getSavedNodeData($ref_id);
                 if (count($objects) > 0) {
                     include_once 'Services/Link/classes/class.ilLink.php';
                     $link = ilLink::_getLink($ref_id, 'trash', array(), '');
                     //$object=$ilias->obj_factory->getInstanceByRefId($ref_id);
                     global $objDefinition;
                     $obj_type = $ilCtrl->context_obj_type;
                     $class_name = $objDefinition->getClassName($obj_type);
                     $next_class = strtolower("ilObj" . $class_name . "GUI");
                     try {
                         if ($next_class == 'ilobjgui') {
                             return;
                         }
                         $objectgui = new $next_class("", $ref_id, true, false);
                         if ($objectgui != null) {
                             $a_par["tabs"]->addTarget("trash", $objectgui->ctrl->getLinkTarget($objectgui, "trash"), "trash", get_class($objectgui));
                         }
                     } catch (Exception $e) {
                     }
                 }
             }
         } catch (Exception $e) {
         }
     }
 }
开发者ID:HochschuleLuzern,项目名称:TrashLink,代码行数:53,代码来源:class.ilTrashLinkUIHookGUI.php


示例12: handleCode

 /**
  * Handle target parameter
  * @param object $a_target
  * @return 
  */
 public static function handleCode($a_ref_id, $a_type, $a_code)
 {
     include_once './Services/Link/classes/class.ilLink.php';
     try {
         self::useCode($a_code, $a_ref_id);
         ilUtil::redirect(ilLink::_getLink($a_ref_id, ilObject::_lookupType(ilObject::_lookupObjId($a_ref_id))));
     } catch (Exception $e) {
         $GLOBALS['ilLog']->logStack();
         $GLOBALS['ilLog']->write($e->getMessage());
         ilUtil::redirect(ilLink::_getLink($e->getCode(), ilObject::_lookupType(ilObject::_lookupObjId($e->getCode()))));
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:17,代码来源:class.ilMembershipRegistrationCodeUtils.php


示例13: send

 /**
  * Parse and send mail
  * @return 
  */
 public function send()
 {
     switch ($this->getType()) {
         case self::TYPE_NOTIFICATION_APPROVERS:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject($this->getLanguageText('reg_mail_new_user'));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_new_user_body'));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_profile'));
                 $info = $this->getAdditionalInformation();
                 $this->appendBody("\n\n");
                 $this->appendBody($info['usr']->getProfileAsString($this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_reason'));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->getMail()->enableSoap(false);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
         case self::TYPE_NOTIFICATION_CONFIRMATION:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject($this->getLanguageText('reg_mail_new_user_confirmation'));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_new_user_body'));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_profile'));
                 $info = $this->getAdditionalInformation();
                 $this->appendBody("\n\n");
                 $this->appendBody($info['usr']->getProfileAsString($this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_confirmation'));
                 $this->appendBody("\n");
                 // #4527
                 include_once "Services/Link/classes/class.ilLink.php";
                 $this->appendBody(ilLink::_getStaticLink($info['usr']->getId(), "usrf"));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('reg_mail_body_reason'));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->getMail()->enableSoap(false);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:55,代码来源:class.ilRegistrationMailNotification.php


示例14: _getStaticLink

 /**
  * Get static link
  *
  * @access public
  * @static
  *
  * @param int reference id
  * @param string object type
  * @param bool fallback to goto.php if robots are disabled
  * @return string goto.html or goto.php link
  */
 public static function _getStaticLink($a_ref_id, $a_type = '', $a_fallback_goto = true, $append = "")
 {
     global $ilObjDataCache;
     if (!strlen($a_type)) {
         $a_type = $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_ref_id));
     }
     include_once 'Services/PrivacySecurity/classes/class.ilRobotSettings.php';
     $robot_settings = ilRobotSettings::_getInstance();
     if (!$robot_settings->robotSupportEnabled()) {
         if ($a_fallback_goto) {
             return ilLink::_getLink($a_ref_id, $a_type, array(), $append);
         } else {
             return false;
         }
     }
     // urlencode for append is needed e.g. to process "/" in wiki page names correctly
     return ILIAS_HTTP_PATH . '/goto_' . urlencode(CLIENT_ID) . '_' . $a_type . '_' . $a_ref_id . urlencode($append) . '.html';
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:29,代码来源:class.ilLink.php


示例15: initItems

 protected function initItems()
 {
     $data = array();
     include_once "Services/Link/classes/class.ilLink.php";
     foreach ($this->obj->getRepositoryTaxonomies() as $tax_id => $objs) {
         foreach ($objs as $obj_id => $obj) {
             $idx = $tax_id . "_" . $obj_id;
             if (!isset($data[$idx])) {
                 $data[$idx] = array("tax_title" => $obj["tax_title"], "obj_title" => $obj["obj_title"], "tax_status" => $obj["tax_status"], "references" => array());
             }
             $path = $obj["path"];
             array_pop($path);
             $path = implode(" › ", $path);
             $data[$idx]["references"][$obj["ref_id"]] = array("path" => $path, "url" => ilLink::_getLink($obj["ref_id"]));
         }
     }
     $this->setData($data);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilTaxonomyAdministrationRepositoryTableGUI.php


示例16: rawurlencode

 /**
  * execute command
  */
 function &executeCommand()
 {
     global $lng, $ilAccess, $tpl, $ilNavigationHistory;
     $cmd = $this->ctrl->getCmd();
     $next_class = $this->ctrl->getNextClass($this);
     if ($next_class == "") {
         $this->ctrl->setCmdClass("ilobjwikigui");
         $next_class = $this->ctrl->getNextClass($this);
     }
     // add entry to navigation history
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $obj_id = ilObject::_lookupObjId($_GET["ref_id"]);
         $title = ilObject::_lookupTitle($obj_id);
         if ($_GET["page"] != "") {
             $page = $_GET["page"];
         } else {
             include_once "./Modules/Wiki/classes/class.ilObjWiki.php";
             $page = ilObjWiki::_lookupStartPage($obj_id);
         }
         include_once "./Modules/Wiki/classes/class.ilWikiPage.php";
         if (ilWikiPage::exists($obj_id, $page)) {
             include_once "./Modules/Wiki/classes/class.ilWikiPage.php";
             $add = "_" . rawurlencode($page);
             $page_id = ilWikiPage::getPageIdForTitle($obj_id, $page);
             $ptitle = ilWikiPage::lookupTitle($page_id);
             $title .= ": " . $ptitle;
             $append = $_GET["page"] != "" ? "_" . ilWikiUtil::makeUrlTitle($page) : "";
             include_once './Services/Link/classes/class.ilLink.php';
             $goto = ilLink::_getStaticLink($_GET["ref_id"], "wiki", true, $append);
             //var_dump($goto);
             $ilNavigationHistory->addItem($_GET["ref_id"], "./goto.php?target=wiki_" . $_GET["ref_id"] . $add, "wiki", $title, $page_id, $goto);
         }
     }
     switch ($next_class) {
         case 'ilobjwikigui':
             require_once "./Modules/Wiki/classes/class.ilObjWikiGUI.php";
             $mc_gui =& new ilObjWikiGUI("", (int) $_GET["ref_id"], true, false);
             $this->ctrl->forwardCommand($mc_gui);
             break;
     }
     $tpl->show();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:45,代码来源:class.ilWikiHandlerGUI.php


示例17: modifyGUI

 function modifyGUI($a_comp, $a_part, $a_par = array())
 {
     if ($a_part == "tabs") {
         // $a_par["tabs"] is ilTabsGUI object
         global $ilias, $tree, $lng, $ilTabs;
         $ref_id = (int) $_GET['ref_id'];
         if ($_GET['baseClass'] == 'ilMailGUI' and (int) $_GET['mail_id'] != 0 or $_GET['cmd'] == 'mailUser' or $_GET['cmdClass'] == 'ilmailformgui' or $_GET['ref'] == 'mail') {
             //we are in emails
             $a_par["tabs"]->setBackTarget($lng->txt("back"), 'ilias.php?cmdClass=ilmailfoldergui&baseClass=ilMailGUI');
             return "";
         }
         if ($_GET['baseClass'] == 'ilPersonalDesktopGUI' and (int) $_GET['wsp_id'] != 0) {
             //we are in arbeitsraum
             return "";
         }
         //print $tree->table_tree;
         if ($ref_id == 0) {
             return "";
         }
         //$obj_type=$a_par["tabs"]->tpl->header_action_ref_id->ctrl->context_obj_type;
         //$parent_id = $a_par["tabs"]->tpl->header_action_ref_id->tree->getParentId($ref_id);
         $parent_id = $tree->getParentId($ref_id);
         $object = $ilias->obj_factory->getInstanceByRefId($ref_id);
         $obj_type = $object->getType();
         $obj_types_with_backlinks = array('cat', 'fold', 'crs', 'grp', 'file', 'wiki', 'frm', 'webr', 'mcst', 'glo', 'exc', 'tst', 'mep', 'qpl', 'book', 'htlm', 'sahs', 'dbk', 'dcl', 'xstr');
         //print_r($_GET['ref_id']);exit;
         //print '-'.$obj_type.'-'.count($a_par["tabs"]->target);
         if (count($a_par["tabs"]->target) > 0 and in_array($obj_type, $obj_types_with_backlinks)) {
             // This function only works with a hslu-patch
             if (method_exists($ilTabs, 'hasBackTarget')) {
                 if ($ilTabs->hasBackTarget()) {
                     return "";
                 }
             }
             $parentobject = $ilias->obj_factory->getInstanceByRefId($parent_id);
             include_once 'Services/Link/classes/class.ilLink.php';
             $link = ilLink::_getLink($parent_id, $parentobject->getType(), array(), '');
             $a_par["tabs"]->setBackTarget($lng->txt("back"), $link);
         }
     }
 }
开发者ID:HochschuleLuzern,项目名称:Backlink,代码行数:41,代码来源:class.ilBacklinkUIHookGUI.php


示例18: getTableGUIData

 public function getTableGUIData($a_parent_ref_id)
 {
     $data = array();
     $parent_type = ilObject::_lookupType($a_parent_ref_id, true);
     include_once './Services/Link/classes/class.ilLink.php';
     foreach ($this->getPossibleItems($a_parent_ref_id) as $item) {
         $tmp = array();
         $tmp['id'] = $item['obj_id'];
         $tmp['ref_id'] = 0;
         $tmp['title'] = $item['title'];
         $tmp['type'] = $item['type'];
         $tmp['status'] = $this->isAssignedEntry($item['obj_id']);
         // #12158
         $tmp['url'] = ilLink::_getLink($a_parent_ref_id, $parent_type, null, "_" . $tmp['id']);
         if ($this->mode == ilLPObjSettings::LP_MODE_COLLECTION_TLT) {
             $tmp['tlt'] = $item['tlt'];
         }
         $data[] = $tmp;
     }
     return $data;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:21,代码来源:class.ilLPCollectionOfLMChapters.php


示例19: send

 public function send()
 {
     include_once './Services/Link/classes/class.ilLink.php';
     $obj = new ilObjectFactory();
     $instance = $obj->getInstanceByRefId($_GET['ref_id']);
     $link = ilLink::_getLink($_GET['ref_id'], $instance->getType(), array(), '');
     global $lng;
     foreach ($this->getRecipients() as $rcp) {
         $this->initLanguage($rcp);
         $this->initMail();
         $this->setSubject(sprintf($lng->txt('rubric_exercise_graded') . ' ' . ilObject::_lookupTitle($this->getObjId()) . ' ' . $lng->txt('rubric_is_now_available'), $this->getObjectTitle(true)));
         $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
         $this->appendBody("\n\n");
         $this->appendBody($lng->txt('rubric_exercise_graded') . ' ' . ilObject::_lookupTitle($this->getObjId()) . ' ' . $lng->txt('rubric_is_now_available'));
         $this->appendBody("\n");
         $this->appendBody($this->getLanguageText('obj_exc') . ": " . $this->getObjectTitle(true));
         $this->appendBody("\n");
         $this->appendBody("\n\n");
         $this->appendBody($link);
         $this->getMail()->appendInstallationSignature(true);
         $this->sendMail(array($rcp), array('system'));
     }
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:23,代码来源:class.ilRubricGradeNotification.php


示例20: addReferenceLinks

 /**
  * Show links to references
  * @param int $a_obj_id $obj_id
  * @return
  */
 protected function addReferenceLinks($a_obj_id)
 {
     global $tree;
     $tpl = new ilTemplate('tpl.cal_reference_links.html', true, true, 'Services/Calendar');
     foreach (ilObject::_getAllReferences($a_obj_id) as $ref_id => $ref_id) {
         include_once './Services/Link/classes/class.ilLink.php';
         $parent_ref_id = $tree->getParentId($ref_id);
         $parent_obj_id = ilObject::_lookupObjId($parent_ref_id);
         $parent_type = ilObject::_lookupType($parent_obj_id);
         $parent_title = ilObject::_lookupTitle($parent_obj_id);
         $type = ilObject::_lookupType($a_obj_id);
         $title = ilObject::_lookupTitle($a_obj_id);
         $tpl->setCurrentBlock('reference');
         $tpl->setVariable('PIMG_SRC', ilUtil::getTypeIconPath($parent_type, $parent_obj_id, 'tiny'));
         $tpl->setVariable('PIMG_ALT', $this->lng->txt('obj_' . $parent_type));
         $tpl->setVariable('PARENT_TITLE', $parent_title);
         $tpl->setVariable('PARENT_HREF', ilLink::_getLink($parent_ref_id));
         $tpl->setVariable('SRC', ilUtil::getTypeIconPath($type, $a_obj_id, 'tiny'));
         $tpl->setVariable('ALT', $this->lng->txt('obj_' . $type));
         $tpl->setVariable('TITLE', $title);
         $tpl->setVariable('HREF', ilLink::_getLink($ref_id));
         $tpl->parseCurrentBlock();
     }
     return $tpl->get();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:30,代码来源:class.ilCalendarCategoryGUI.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilMail类代码示例发布时间:2022-05-23
下一篇:
PHP ilLanguage类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap