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:
parent
2cd4f2e827
commit
ab5e019b3d
2 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue