本文整理汇总了PHP中PhabricatorApplicationSearchResultView::setTable方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationSearchResultView::setTable方法的具体用法?PHP PhabricatorApplicationSearchResultView::setTable怎么用?PHP PhabricatorApplicationSearchResultView::setTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplicationSearchResultView
的用法示例。
在下文中一共展示了PhabricatorApplicationSearchResultView::setTable方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderResultList
protected function renderResultList(array $authorizations, PhabricatorSavedQuery $query, array $handles)
{
$list = id(new DrydockAuthorizationListView())->setUser($this->requireViewer())->setAuthorizations($authorizations);
$result = new PhabricatorApplicationSearchResultView();
$result->setTable($list);
return $result;
}
示例2: renderResultList
protected function renderResultList(array $invites, PhabricatorSavedQuery $query, array $handles)
{
assert_instances_of($invites, 'PhabricatorAuthInvite');
$viewer = $this->requireViewer();
$rows = array();
foreach ($invites as $invite) {
$rows[] = array($invite->getEmailAddress(), $handles[$invite->getAuthorPHID()]->renderLink(), $invite->getAcceptedByPHID() ? $handles[$invite->getAcceptedByPHID()]->renderLink() : null, phabricator_datetime($invite->getDateCreated(), $viewer));
}
$table = id(new AphrontTableView($rows))->setHeaders(array(pht('Email Address'), pht('Sent By'), pht('Accepted By'), pht('Invited')))->setColumnClasses(array('', '', 'wide', 'right'));
$result = new PhabricatorApplicationSearchResultView();
$result->setTable($table);
return $result;
}
示例3: renderResultList
protected function renderResultList(array $signatures, PhabricatorSavedQuery $query, array $handles)
{
assert_instances_of($signatures, 'LegalpadDocumentSignature');
$viewer = $this->requireViewer();
Javelin::initBehavior('phabricator-tooltips');
$sig_good = $this->renderIcon('fa-check', null, pht('Verified, Current'));
$sig_corp = $this->renderIcon('fa-building-o', null, pht('Verified, Corporate'));
$sig_old = $this->renderIcon('fa-clock-o', 'orange', pht('Signed Older Version'));
$sig_unverified = $this->renderIcon('fa-envelope', 'red', pht('Unverified Email'));
$sig_exemption = $this->renderIcon('fa-asterisk', 'indigo', pht('Exemption'));
id(new PHUIIconView())->setIcon('fa-envelope', 'red')->addSigil('has-tooltip')->setMetadata(array('tip' => pht('Unverified Email')));
$type_corporate = LegalpadDocument::SIGNATURE_TYPE_CORPORATION;
$rows = array();
foreach ($signatures as $signature) {
$name = $signature->getSignerName();
$email = $signature->getSignerEmail();
$document = $signature->getDocument();
if ($signature->getIsExemption()) {
$sig_icon = $sig_exemption;
} else {
if (!$signature->isVerified()) {
$sig_icon = $sig_unverified;
} else {
if ($signature->getDocumentVersion() != $document->getVersions()) {
$sig_icon = $sig_old;
} else {
if ($signature->getSignatureType() == $type_corporate) {
$sig_icon = $sig_corp;
} else {
$sig_icon = $sig_good;
}
}
}
}
$signature_href = $this->getApplicationURI('signature/' . $signature->getID() . '/');
$sig_icon = javelin_tag('a', array('href' => $signature_href, 'sigil' => 'workflow'), $sig_icon);
$signer_phid = $signature->getSignerPHID();
$rows[] = array($sig_icon, $handles[$document->getPHID()]->renderLink(), $signer_phid ? $handles[$signer_phid]->renderLink() : null, $name, phutil_tag('a', array('href' => 'mailto:' . $email), $email), phabricator_datetime($signature->getDateCreated(), $viewer));
}
$table = id(new AphrontTableView($rows))->setNoDataString(pht('No signatures match the query.'))->setHeaders(array('', pht('Document'), pht('Account'), pht('Name'), pht('Email'), pht('Signed')))->setColumnVisibility(array(true, !$this->document))->setColumnClasses(array('', '', '', '', 'wide', 'right'));
$button = null;
if ($this->document) {
$document_id = $this->document->getID();
$button = id(new PHUIButtonView())->setText(pht('Add Exemption'))->setTag('a')->setHref($this->getApplicationURI('addsignature/' . $document_id . '/'))->setWorkflow(true)->setIcon('fa-pencil');
}
if (!$this->document) {
$table->setNotice(pht('NOTE: You can only see your own signatures and signatures on ' . 'documents you have permission to edit.'));
}
$result = new PhabricatorApplicationSearchResultView();
$result->setTable($table);
if ($button) {
$result->addAction($button);
}
return $result;
}
示例4: renderResultList
protected function renderResultList(array $carts, PhabricatorSavedQuery $query, array $handles)
{
assert_instances_of($carts, 'PhortuneCart');
$viewer = $this->requireViewer();
$rows = array();
foreach ($carts as $cart) {
$merchant = $cart->getMerchant();
if ($this->getMerchant()) {
$href = $this->getApplicationURI('merchant/' . $merchant->getID() . '/cart/' . $cart->getID() . '/');
} else {
$href = $cart->getDetailURI();
}
$rows[] = array($cart->getID(), $handles[$cart->getPHID()]->renderLink(), $handles[$merchant->getPHID()]->renderLink(), $handles[$cart->getAuthorPHID()]->renderLink(), $cart->getTotalPriceAsCurrency()->formatForDisplay(), PhortuneCart::getNameForStatus($cart->getStatus()), phabricator_datetime($cart->getDateModified(), $viewer));
}
$table = id(new AphrontTableView($rows))->setNoDataString(pht('No orders match the query.'))->setHeaders(array(pht('ID'), pht('Order'), pht('Merchant'), pht('Authorized By'), pht('Amount'), pht('Status'), pht('Updated')))->setColumnClasses(array('', 'pri', '', '', 'wide right', '', 'right'));
$merchant = $this->getMerchant();
if ($merchant) {
$notice = pht('Orders for %s', $merchant->getName());
} else {
$notice = pht('Your Orders');
}
$table->setNotice($notice);
$result = new PhabricatorApplicationSearchResultView();
$result->setTable($table);
return $result;
}
示例5: renderResultList
protected function renderResultList(array $subscriptions, PhabricatorSavedQuery $query, array $handles)
{
assert_instances_of($subscriptions, 'PhortuneSubscription');
$viewer = $this->requireViewer();
$table = id(new PhortuneSubscriptionTableView())->setUser($viewer)->setHandles($handles)->setSubscriptions($subscriptions);
$merchant = $this->getMerchant();
if ($merchant) {
$header = pht('Subscriptions for %s', $merchant->getName());
$table->setIsMerchantView(true);
} else {
$header = pht('Your Subscriptions');
}
$table->setNotice($header);
$result = new PhabricatorApplicationSearchResultView();
$result->setTable($table);
return $result;
}
示例6: renderResultList
protected function renderResultList(array $charges, PhabricatorSavedQuery $query, array $handles)
{
assert_instances_of($charges, 'PhortuneCharge');
$viewer = $this->requireViewer();
$table = id(new PhortuneChargeTableView())->setUser($viewer)->setCharges($charges)->setHandles($handles);
$result = new PhabricatorApplicationSearchResultView();
$result->setTable($table);
return $table;
}
示例7: renderResultList
protected function renderResultList(array $backers, PhabricatorSavedQuery $query, array $handles)
{
assert_instances_of($backers, 'FundBacker');
$viewer = $this->requireViewer();
$rows = array();
foreach ($backers as $backer) {
$rows[] = array($handles[$backer->getInitiativePHID()]->renderLink(), $handles[$backer->getBackerPHID()]->renderLink(), $backer->getAmountAsCurrency()->formatForDisplay(), phabricator_datetime($backer->getDateCreated(), $viewer));
}
$table = id(new AphrontTableView($rows))->setHeaders(array(pht('Initiative'), pht('Backer'), pht('Amount'), pht('Date')))->setColumnClasses(array(null, null, 'wide right', 'right'));
$result = new PhabricatorApplicationSearchResultView();
$result->setTable($table);
return $result;
}
示例8: renderResultList
protected function renderResultList(array $logs, PhabricatorSavedQuery $query, array $handles)
{
assert_instances_of($logs, 'PhabricatorUserLog');
$viewer = $this->requireViewer();
$table = id(new PhabricatorUserLogView())->setUser($viewer)->setLogs($logs)->setHandles($handles);
if ($viewer->getIsAdmin()) {
$table->setSearchBaseURI($this->getApplicationURI('logs/'));
}
$result = new PhabricatorApplicationSearchResultView();
$result->setTable($table);
return $result;
}