本文整理匯總了PHP中AphrontPanelView::setId方法的典型用法代碼示例。如果您正苦於以下問題:PHP AphrontPanelView::setId方法的具體用法?PHP AphrontPanelView::setId怎麽用?PHP AphrontPanelView::setId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AphrontPanelView
的用法示例。
在下文中一共展示了AphrontPanelView::setId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: buildOpenRevisions
protected function buildOpenRevisions()
{
$drequest = $this->getDiffusionRequest();
$repository = $drequest->getRepository();
$path = $drequest->getPath();
$path_map = id(new DiffusionPathIDQuery(array($path)))->loadPathIDs();
$path_id = idx($path_map, $path);
if (!$path_id) {
return null;
}
$revisions = id(new DifferentialRevisionQuery())->withPath($repository->getID(), $path_id)->withStatus(DifferentialRevisionQuery::STATUS_OPEN)->setOrder(DifferentialRevisionQuery::ORDER_PATH_MODIFIED)->setLimit(10)->needRelationships(true)->execute();
if (!$revisions) {
return null;
}
$view = id(new DifferentialRevisionListView())->setRevisions($revisions)->setFields(DifferentialRevisionListView::getDefaultFields())->setUser($this->getRequest()->getUser())->loadAssets();
$phids = $view->getRequiredHandlePHIDs();
$handles = $this->loadViewerHandles($phids);
$view->setHandles($handles);
$panel = new AphrontPanelView();
$panel->setId('pending-differential-revisions');
$panel->setHeader('Pending Differential Revisions');
$panel->appendChild($view);
return $panel;
}