Provide convenience method addTextCrumb() to PhabricatorCrumbsView
Summary: We currently have a lot of calls to `addCrumb(id(new PhabricatorCrumbView())->...)` which can be expressed much more simply with a convenience method. Nearly all crumbs are only textual. Test Plan: - This was mostly automated, then I cleaned up a few unusual sites manually. - Bunch of grep / randomly clicking around. Reviewers: btrahan, chad Reviewed By: btrahan CC: hach-que, aran Differential Revision: https://secure.phabricator.com/D7787
This commit is contained in:
@@ -59,18 +59,15 @@ final class DivinerAtomController extends DivinerController {
|
||||
$atom = $symbol->getAtom();
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName($book->getShortTitle())
|
||||
->setHref('/book/'.$book->getName().'/'));
|
||||
$crumbs->addTextCrumb(
|
||||
$book->getShortTitle(),
|
||||
'/book/'.$book->getName().'/');
|
||||
|
||||
$atom_short_title = $atom->getDocblockMetaValue(
|
||||
'short',
|
||||
$symbol->getTitle());
|
||||
|
||||
$crumbs->addCrumb(
|
||||
id(new PhabricatorCrumbView())
|
||||
->setName($atom_short_title));
|
||||
$crumbs->addTextCrumb($atom_short_title);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($this->renderFullSignature($symbol))
|
||||
|
||||
Reference in New Issue
Block a user