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


PHP Tracker::getContributorField方法代码示例

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


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

示例1: checkPermissionValidity

 private function checkPermissionValidity(Tracker_Permission_PermissionRequest $request, Tracker $tracker)
 {
     if ($request->containsPermissionType(Tracker_Permission_Command::PERMISSION_ASSIGNEE) != null && $tracker->getContributorField() === null) {
         $GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_tracker_admin_permissions', 'no_assignee_semantic', array(TRACKER_BASE_URL . '/?' . http_build_query(array('func' => 'admin-semantic', 'tracker' => $tracker->getId())), $GLOBALS['Language']->getText('plugin_tracker_admin_semantic', 'contributor_label'))), CODENDI_PURIFIER_DISABLED);
         return false;
     }
     if ($request->getPermissionType(ProjectUGroup::PROJECT_ADMIN)) {
         return false;
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:PermissionManager.class.php

示例2: getMatchingIdsInDb

 protected function getMatchingIdsInDb(DataAccessObject $dao, PermissionsManager $permissionManager, Tracker $tracker, PFUser $user, array $criteria)
 {
     $dump_criteria = array();
     foreach ($criteria as $c) {
         $dump_criteria[$c->field->getName()] = $c->field->getCriteriaValue($c);
     }
     $dao->logStart(__METHOD__, json_encode(array('user' => $user->getUserName(), 'project' => $tracker->getGroupId(), 'query' => $dump_criteria, 'trackers' => array($tracker->getId()))));
     $matching_ids = array();
     $group_id = $tracker->getGroupId();
     $permissions = $permissionManager->getPermissionsAndUgroupsByObjectid($tracker->getId());
     $contributor_field = $tracker->getContributorField();
     $contributor_field_id = $contributor_field ? $contributor_field->getId() : null;
     $additional_from = array();
     $additional_where = array();
     foreach ($criteria as $c) {
         if ($f = $c->getFrom()) {
             $additional_from[] = $f;
         }
         if ($w = $c->getWhere()) {
             $additional_where[] = $w;
         }
     }
     $matching_ids['id'] = '';
     $matching_ids['last_changeset_id'] = '';
     $matching_ids_result = $dao->searchMatchingIds($group_id, $tracker->getId(), $additional_from, $additional_where, $user, $permissions, $contributor_field_id);
     if ($matching_ids_result) {
         $matching_ids = $matching_ids_result->getRow();
         if ($matching_ids) {
             if (substr($matching_ids['id'], -1) === ',') {
                 $matching_ids['id'] = substr($matching_ids['id'], 0, -1);
             }
             if (substr($matching_ids['last_changeset_id'], -1) === ',') {
                 $matching_ids['last_changeset_id'] = substr($matching_ids['last_changeset_id'], 0, -1);
             }
         }
     }
     $nb_matching = $matching_ids['id'] ? substr_count($matching_ids['id'], ',') + 1 : 0;
     $dao->logEnd(__METHOD__, $nb_matching);
     return $matching_ids;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:40,代码来源:Tracker_Report.class.php


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