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


PHP PhabricatorProject::getMemberPHIDs方法代码示例

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


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

示例1: applyLeaveProject

 public static function applyLeaveProject(PhabricatorProject $project, PhabricatorUser $user)
 {
     $members = array_fill_keys($project->getMemberPHIDs(), true);
     unset($members[$user->getPHID()]);
     $members = array_keys($members);
     self::applyOneTransaction($project, $user, PhabricatorProjectTransactionType::TYPE_MEMBERS, $members);
 }
开发者ID:neoxen,项目名称:phabricator,代码行数:7,代码来源:PhabricatorProjectEditor.php

示例2: buildPropertyListView

 private function buildPropertyListView(PhabricatorProject $project, PhabricatorActionListView $actions)
 {
     $request = $this->getRequest();
     $viewer = $request->getUser();
     $this->loadHandles(array_merge($project->getMemberPHIDs(), $project->getWatcherPHIDs()));
     $view = id(new PHUIPropertyListView())->setUser($viewer)->setObject($project)->setActionList($actions);
     $hashtags = array();
     foreach ($project->getSlugs() as $slug) {
         $hashtags[] = id(new PHUITagView())->setType(PHUITagView::TYPE_OBJECT)->setName('#' . $slug->getSlug());
     }
     $view->addProperty(pht('Hashtags'), phutil_implode_html(' ', $hashtags));
     $view->addProperty(pht('Members'), $project->getMemberPHIDs() ? $this->renderHandlesForPHIDs($project->getMemberPHIDs(), ',') : phutil_tag('em', array(), pht('None')));
     $view->addProperty(pht('Watchers'), $project->getWatcherPHIDs() ? $this->renderHandlesForPHIDs($project->getWatcherPHIDs(), ',') : phutil_tag('em', array(), pht('None')));
     $field_list = PhabricatorCustomField::getObjectFields($project, PhabricatorCustomField::ROLE_VIEW);
     $field_list->appendFieldsToPropertyList($project, $viewer, $view);
     return $view;
 }
开发者ID:denghp,项目名称:phabricator,代码行数:17,代码来源:PhabricatorProjectProfileController.php

示例3: renderPeoplePage

 private function renderPeoplePage(PhabricatorProject $project, PhabricatorProjectProfile $profile)
 {
     $member_phids = $project->getMemberPHIDs();
     $handles = id(new PhabricatorObjectHandleData($member_phids))->loadHandles();
     $affiliated = array();
     foreach ($handles as $phids => $handle) {
         $affiliated[] = '<li>' . $handle->renderLink() . '</li>';
     }
     if ($affiliated) {
         $affiliated = '<ul>' . implode("\n", $affiliated) . '</ul>';
     } else {
         $affiliated = '<p><em>No one is affiliated with this project.</em></p>';
     }
     return '<div class="phabricator-profile-info-group">' . '<h1 class="phabricator-profile-info-header">People</h1>' . '<div class="phabricator-profile-info-pane">' . $affiliated . '</div>' . '</div>';
 }
开发者ID:neoxen,项目名称:phabricator,代码行数:15,代码来源:PhabricatorProjectProfileController.php


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