\d+)' => 'DifferentialRevisionViewController', '/differential/' => array( '' => 'DifferentialRevisionListController', 'filter/(?P\w+)/(?:(?P\w+)/)?' => 'DifferentialRevisionListController', 'stats/(?P\w+)/' => 'DifferentialRevisionStatsController', 'diff/' => array( '(?P\d+)/' => 'DifferentialDiffViewController', 'create/' => 'DifferentialDiffCreateController', ), 'changeset/' => 'DifferentialChangesetViewController', 'revision/edit/(?:(?P\d+)/)?' => 'DifferentialRevisionEditController', 'comment/' => array( 'preview/(?P\d+)/' => 'DifferentialCommentPreviewController', 'save/' => 'DifferentialCommentSaveController', 'inline/' => array( 'preview/(?P\d+)/' => 'DifferentialInlineCommentPreviewController', 'edit/(?P\d+)/' => 'DifferentialInlineCommentEditController', ), ), 'subscribe/(?Padd|rem)/(?P\d+)/' => 'DifferentialSubscribeController', ), ); } public function getCoreApplicationOrder() { return 0.100; } public function loadStatus(PhabricatorUser $user) { $revisions = id(new DifferentialRevisionQuery()) ->withResponsibleUsers(array($user->getPHID())) ->withStatus(DifferentialRevisionQuery::STATUS_OPEN) ->execute(); list($active, $waiting) = DifferentialRevisionQuery::splitResponsible( $revisions, $user->getPHID()); $status = array(); $active = count($active); $type = $active ? PhabricatorApplicationStatusView::TYPE_NEEDS_ATTENTION : PhabricatorApplicationStatusView::TYPE_EMPTY; $status[] = id(new PhabricatorApplicationStatusView()) ->setType($type) ->setText(pht('%d Review(s) Need Attention', $active)) ->setCount($active); $waiting = count($waiting); $type = $waiting ? PhabricatorApplicationStatusView::TYPE_INFO : PhabricatorApplicationStatusView::TYPE_EMPTY; $status[] = id(new PhabricatorApplicationStatusView()) ->setType($type) ->setText(pht('%d Review(s) Waiting on Others', $waiting)); return $status; } }