1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Pass user to DifferentialRevisionDetailRenderer

Summary: I know that this code would be replaced by something else but until then...

Test Plan: Used it in our renderer.

Reviewers: epriestley, edward

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5165
This commit is contained in:
vrana 2013-02-28 17:12:58 -08:00
parent 2cd4f2e827
commit ab5e019b3d
2 changed files with 11 additions and 0 deletions

View file

@ -1,9 +1,19 @@
<?php
abstract class DifferentialRevisionDetailRenderer {
private $user;
private $diff;
private $vsDiff;
final public function setUser(PhabricatorUser $user) {
$this->user = $user;
return $this;
}
final protected function getUser() {
return $this->user;
}
final public function setDiff(DifferentialDiff $diff) {
$this->diff = $diff;
return $this;

View file

@ -238,6 +238,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
// TODO: build a better version of the action links and deprecate the
// whole DifferentialRevisionDetailRenderer class.
$custom_renderer = newv($custom_renderer_class, array());
$custom_renderer->setUser($user);
$custom_renderer->setDiff($target);
if ($diff_vs) {
$custom_renderer->setVSDiff($diffs[$diff_vs]);