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


PHP ilChangeEvent::_lookupChangeState方法代码示例

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


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

示例1: testChangeEvent

 /**
  * change event test 
  * @param
  * @return
  */
 public function testChangeEvent()
 {
     global $ilUser;
     include_once './Services/Tracking/classes/class.ilChangeEvent.php';
     $ret = ilChangeEvent::_deactivate();
     $ret = ilChangeEvent::_activate();
     $res = ilChangeEvent::_lookupUncaughtWriteEvents(9, $ilUser->getId());
     $res = ilChangeEvent::_lookupChangeState(9, $ilUser->getId());
     $res = ilChangeEvent::_lookupInsideChangeState(9, $ilUser->getId());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:ilTrackingTest.php

示例2: getProperties

 /**
  * Get item properties
  *
  * Overwrite this method to add properties at
  * the bottom of the item html
  *
  * @return	array		array of property arrays:
  *						"alert" (boolean) => display as an alert property (usually in red)
  *						"property" (string) => property name
  *						"value" (string) => property value
  */
 public function getProperties($a_item = '')
 {
     global $objDefinition;
     $props = array();
     // please list alert properties first
     // example (use $lng->txt instead of "Status"/"Offline" strings):
     // $props[] = array("alert" => true, "property" => "Status", "value" => "Offline");
     // $props[] = array("alert" => false, "property" => ..., "value" => ...);
     // ...
     // #8280: WebDav is only supported in repository
     if ($this->context == self::CONTEXT_REPOSITORY) {
         // BEGIN WebDAV Display locking information
         require_once 'Services/WebDAV/classes/class.ilDAVActivationChecker.php';
         if (ilDAVActivationChecker::_isActive()) {
             require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
             global $ilias, $lng;
             // Show lock info
             require_once 'Services/WebDAV/classes/class.ilDAVLocks.php';
             $davLocks = new ilDAVLocks();
             if ($ilias->account->getId() != ANONYMOUS_USER_ID) {
                 $locks =& $davLocks->getLocksOnObjectObj($this->obj_id);
                 if (count($locks) > 0) {
                     $lockUser = new ilObjUser($locks[0]['ilias_owner']);
                     $props[] = array("alert" => false, "property" => $lng->txt("in_use_by"), "value" => $lockUser->getLogin(), "link" => "./ilias.php?user=" . $locks[0]['ilias_owner'] . '&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI');
                 }
             }
             // END WebDAV Display locking information
             if ($this->getDetailsLevel() == self::DETAILS_SEARCH) {
                 return $props;
             }
             // BEGIN WebDAV Display warning for invisible Unix files and files with special characters
             if (preg_match('/^(\\.|\\.\\.)$/', $this->title)) {
                 $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"), "value" => $lng->txt("filename_special_filename"), 'propertyNameVisible' => false);
             } else {
                 if (preg_match('/^\\./', $this->title)) {
                     $props[] = array("alert" => false, "property" => $lng->txt("filename_visibility"), "value" => $lng->txt("filename_hidden_unix_file"), 'propertyNameVisible' => false);
                 } else {
                     if (preg_match('/~$/', $this->title)) {
                         $props[] = array("alert" => false, "property" => $lng->txt("filename_visibility"), "value" => $lng->txt("filename_hidden_backup_file"), 'propertyNameVisible' => false);
                     } else {
                         if (preg_match('/[\\/]/', $this->title)) {
                             $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"), "value" => $lng->txt("filename_special_characters"), 'propertyNameVisible' => false);
                         } else {
                             if (preg_match('/[\\\\\\/:*?"<>|]/', $this->title)) {
                                 $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"), "value" => $lng->txt("filename_windows_special_characters"), 'propertyNameVisible' => false);
                             } else {
                                 if (preg_match('/\\.$/', $this->title)) {
                                     $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"), "value" => $lng->txt("filename_windows_empty_extension"), 'propertyNameVisible' => false);
                                 } else {
                                     if (preg_match('/^(\\.|\\.\\.)$/', $this->title)) {
                                         $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"), "value" => $lng->txt("filename_special_filename"), 'propertyNameVisible' => false);
                                     } else {
                                         if (preg_match('/#/', $this->title)) {
                                             $props[] = array("alert" => false, "property" => $lng->txt("filename_interoperability"), "value" => $lng->txt("filename_windows_webdav_issue"), 'propertyNameVisible' => false);
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
         // END WebDAV Display warning for invisible files and files with special characters
         // BEGIN ChangeEvent: display changes.
         require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
         if (ilChangeEvent::_isActive()) {
             global $ilias, $lng, $ilUser;
             if ($ilias->account->getId() != ANONYMOUS_USER_ID) {
                 // Performance improvement: for container objects
                 // we only display 'changed inside' events, for
                 // leaf objects we only display 'object new/changed'
                 // events
                 $isContainer = in_array($this->type, array('cat', 'fold', 'crs', 'grp'));
                 if ($isContainer) {
                     $state = ilChangeEvent::_lookupInsideChangeState($this->obj_id, $ilUser->getId());
                     if ($state > 0) {
                         $props[] = array("alert" => true, "value" => $lng->txt('state_changed_inside'), 'propertyNameVisible' => false);
                     }
                 } elseif ($this->type == "file") {
                     $state = ilChangeEvent::_lookupChangeState($this->obj_id, $ilUser->getId());
                     if ($state > 0) {
                         $props[] = array("alert" => true, "value" => $lng->txt($state == 1 ? 'state_unread' : 'state_changed'), 'propertyNameVisible' => false);
                     }
                 }
             }
         }
         // END ChangeEvent: display changes.
     }
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjectListGUI.php


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