本文整理汇总了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);
}
示例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;
}
示例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>';
}