From ef214e94cebd27e2a775fbf60a4c2b1c3e2524af Mon Sep 17 00:00:00 2001 From: vrana Date: Thu, 20 Dec 2012 14:27:12 -0800 Subject: [PATCH] Move setUser() to AphrontView Summary: This is used in every other view. Test Plan: Browsed around. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4248 --- .../audit/view/PhabricatorAuditCommitListView.php | 6 ------ .../audit/view/PhabricatorAuditListView.php | 6 ------ .../calendar/view/AphrontCalendarMonthView.php | 6 ------ .../daemon/view/PhabricatorDaemonLogEventsView.php | 6 ------ .../daemon/view/PhabricatorDaemonLogListView.php | 6 ------ .../differential/view/DifferentialAddCommentView.php | 6 ------ .../view/DifferentialChangesetListView.php | 8 +------- .../view/DifferentialDiffTableOfContentsView.php | 6 ------ .../view/DifferentialInlineCommentEditView.php | 6 ------ .../view/DifferentialLocalCommitsView.php | 6 ------ .../view/DifferentialRevisionCommentListView.php | 6 ------ .../view/DifferentialRevisionCommentView.php | 6 ------ .../view/DifferentialRevisionDetailView.php | 9 --------- .../view/DifferentialRevisionListView.php | 6 ------ .../view/DifferentialRevisionStatsView.php | 6 ------ .../view/DifferentialRevisionUpdateHistoryView.php | 10 ---------- .../diffusion/view/DiffusionBranchTableView.php | 6 ------ .../diffusion/view/DiffusionBrowseTableView.php | 6 ------ .../diffusion/view/DiffusionCommentListView.php | 6 ------ .../diffusion/view/DiffusionCommentView.php | 6 ------ .../diffusion/view/DiffusionTagListView.php | 6 ------ .../flag/view/PhabricatorFlagListView.php | 6 ------ .../herald/view/HeraldRuleEditHistoryView.php | 6 ------ src/applications/herald/view/HeraldRuleListView.php | 6 ------ .../maniphest/view/ManiphestTaskListView.php | 6 ------ .../maniphest/view/ManiphestTaskSummaryView.php | 6 ------ .../maniphest/view/ManiphestTransactionDetailView.php | 6 ------ .../maniphest/view/ManiphestTransactionListView.php | 6 ------ .../meta/view/PhabricatorApplicationLaunchView.php | 6 ------ .../contentsource/PhabricatorContentSourceView.php | 7 ------- .../control/PhortuneMonthYearExpiryControl.php | 9 --------- .../stripe/view/PhortuneStripePaymentFormView.php | 9 --------- src/applications/ponder/view/PonderAddAnswerView.php | 6 ------ src/applications/ponder/view/PonderAddCommentView.php | 6 ------ src/applications/ponder/view/PonderAnswerListView.php | 6 ------ .../ponder/view/PonderCommentListView.php | 6 ------ src/applications/ponder/view/PonderPostBodyView.php | 6 ------ .../ponder/view/PonderQuestionDetailView.php | 6 ------ .../ponder/view/PonderQuestionSummaryView.php | 6 ------ .../ponder/view/PonderUserProfileView.php | 6 ------ .../xhprof/view/PhabricatorXHProfSampleListView.php | 6 ------ src/view/AphrontDialogView.php | 6 ------ src/view/AphrontView.php | 10 ++++++++++ src/view/form/AphrontFormView.php | 6 ------ src/view/form/control/AphrontFormDateControl.php | 6 ------ src/view/form/control/AphrontFormPolicyControl.php | 10 ---------- src/view/form/control/AphrontFormTokenizerControl.php | 6 ------ src/view/form/control/PhabricatorRemarkupControl.php | 11 ----------- src/view/layout/AphrontSideNavFilterView.php | 6 ------ src/view/layout/PhabricatorActionListView.php | 6 ------ src/view/layout/PhabricatorActionView.php | 6 ------ src/view/layout/PhabricatorTransactionView.php | 6 ------ src/view/layout/headsup/AphrontHeadsupActionView.php | 6 ------ src/view/page/menu/PhabricatorMainMenuSearchView.php | 6 ------ src/view/page/menu/PhabricatorMainMenuView.php | 10 ---------- 55 files changed, 11 insertions(+), 352 deletions(-) diff --git a/src/applications/audit/view/PhabricatorAuditCommitListView.php b/src/applications/audit/view/PhabricatorAuditCommitListView.php index f9e992076b..6987fa117e 100644 --- a/src/applications/audit/view/PhabricatorAuditCommitListView.php +++ b/src/applications/audit/view/PhabricatorAuditCommitListView.php @@ -2,16 +2,10 @@ final class PhabricatorAuditCommitListView extends AphrontView { - private $user; private $commits; private $handles; private $noDataString; - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setNoDataString($no_data_string) { $this->noDataString = $no_data_string; return $this; diff --git a/src/applications/audit/view/PhabricatorAuditListView.php b/src/applications/audit/view/PhabricatorAuditListView.php index 0fad4b55a4..2bac041aa1 100644 --- a/src/applications/audit/view/PhabricatorAuditListView.php +++ b/src/applications/audit/view/PhabricatorAuditListView.php @@ -7,7 +7,6 @@ final class PhabricatorAuditListView extends AphrontView { private $authorityPHIDs = array(); private $noDataString; private $commits; - private $user; private $showDescriptions = true; private $highlightedAudits; @@ -44,11 +43,6 @@ final class PhabricatorAuditListView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setShowDescriptions($show_descriptions) { $this->showDescriptions = $show_descriptions; return $this; diff --git a/src/applications/calendar/view/AphrontCalendarMonthView.php b/src/applications/calendar/view/AphrontCalendarMonthView.php index 429c2257e8..fa7d119d1f 100644 --- a/src/applications/calendar/view/AphrontCalendarMonthView.php +++ b/src/applications/calendar/view/AphrontCalendarMonthView.php @@ -2,7 +2,6 @@ final class AphrontCalendarMonthView extends AphrontView { - private $user; private $month; private $year; private $holidays = array(); @@ -17,11 +16,6 @@ final class AphrontCalendarMonthView extends AphrontView { return $this->browseURI; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function addEvent(AphrontCalendarEventView $event) { $this->events[] = $event; return $this; diff --git a/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php b/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php index bb50fc67a4..57a3a5db2e 100644 --- a/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php +++ b/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php @@ -4,7 +4,6 @@ final class PhabricatorDaemonLogEventsView extends AphrontView { private $events; private $combinedLog; - private $user; public function setEvents(array $events) { assert_instances_of($events, 'PhabricatorDaemonLogEvent'); @@ -17,11 +16,6 @@ final class PhabricatorDaemonLogEventsView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function render() { $rows = array(); diff --git a/src/applications/daemon/view/PhabricatorDaemonLogListView.php b/src/applications/daemon/view/PhabricatorDaemonLogListView.php index 4202908189..c3f856d2ca 100644 --- a/src/applications/daemon/view/PhabricatorDaemonLogListView.php +++ b/src/applications/daemon/view/PhabricatorDaemonLogListView.php @@ -3,7 +3,6 @@ final class PhabricatorDaemonLogListView extends AphrontView { private $daemonLogs; - private $user; public function setDaemonLogs(array $daemon_logs) { assert_instances_of($daemon_logs, 'PhabricatorDaemonLog'); @@ -11,11 +10,6 @@ final class PhabricatorDaemonLogListView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function render() { $rows = array(); diff --git a/src/applications/differential/view/DifferentialAddCommentView.php b/src/applications/differential/view/DifferentialAddCommentView.php index 095f695d7e..3910a4a8ed 100644 --- a/src/applications/differential/view/DifferentialAddCommentView.php +++ b/src/applications/differential/view/DifferentialAddCommentView.php @@ -5,7 +5,6 @@ final class DifferentialAddCommentView extends AphrontView { private $revision; private $actions; private $actionURI; - private $user; private $draft; private $auxFields; private $reviewers = array(); @@ -32,11 +31,6 @@ final class DifferentialAddCommentView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setDraft(PhabricatorDraft $draft = null) { $this->draft = $draft; return $this; diff --git a/src/applications/differential/view/DifferentialChangesetListView.php b/src/applications/differential/view/DifferentialChangesetListView.php index f58cd45917..fc969acd94 100644 --- a/src/applications/differential/view/DifferentialChangesetListView.php +++ b/src/applications/differential/view/DifferentialChangesetListView.php @@ -13,7 +13,6 @@ final class DifferentialChangesetListView extends AphrontView { private $leftRawFileURI; private $rightRawFileURI; - private $user; private $symbolIndexes = array(); private $repository; private $branch; @@ -21,7 +20,7 @@ final class DifferentialChangesetListView extends AphrontView { private $vsMap = array(); private $title; - + public function setTitle($title) { $this->title = $title; return $this; @@ -53,11 +52,6 @@ final class DifferentialChangesetListView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setRepository(PhabricatorRepository $repository) { $this->repository = $repository; return $this; diff --git a/src/applications/differential/view/DifferentialDiffTableOfContentsView.php b/src/applications/differential/view/DifferentialDiffTableOfContentsView.php index ee4900b99a..912fa70c44 100644 --- a/src/applications/differential/view/DifferentialDiffTableOfContentsView.php +++ b/src/applications/differential/view/DifferentialDiffTableOfContentsView.php @@ -7,7 +7,6 @@ final class DifferentialDiffTableOfContentsView extends AphrontView { private $references = array(); private $repository; private $diff; - private $user; private $renderURI = '/differential/changeset/'; private $revisionID; private $whitespace; @@ -43,11 +42,6 @@ final class DifferentialDiffTableOfContentsView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setRevisionID($revision_id) { $this->revisionID = $revision_id; return $this; diff --git a/src/applications/differential/view/DifferentialInlineCommentEditView.php b/src/applications/differential/view/DifferentialInlineCommentEditView.php index cc62d2eb26..73dcb7051f 100644 --- a/src/applications/differential/view/DifferentialInlineCommentEditView.php +++ b/src/applications/differential/view/DifferentialInlineCommentEditView.php @@ -2,7 +2,6 @@ final class DifferentialInlineCommentEditView extends AphrontView { - private $user; private $inputs = array(); private $uri; private $title; @@ -15,11 +14,6 @@ final class DifferentialInlineCommentEditView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setSubmitURI($uri) { $this->uri = $uri; return $this; diff --git a/src/applications/differential/view/DifferentialLocalCommitsView.php b/src/applications/differential/view/DifferentialLocalCommitsView.php index cc90fef0c1..4606596dcd 100644 --- a/src/applications/differential/view/DifferentialLocalCommitsView.php +++ b/src/applications/differential/view/DifferentialLocalCommitsView.php @@ -3,18 +3,12 @@ final class DifferentialLocalCommitsView extends AphrontView { private $localCommits; - private $user; public function setLocalCommits($local_commits) { $this->localCommits = $local_commits; return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function render() { $user = $this->user; if (!$user) { diff --git a/src/applications/differential/view/DifferentialRevisionCommentListView.php b/src/applications/differential/view/DifferentialRevisionCommentListView.php index 71175718fd..791de06a65 100644 --- a/src/applications/differential/view/DifferentialRevisionCommentListView.php +++ b/src/applications/differential/view/DifferentialRevisionCommentListView.php @@ -6,7 +6,6 @@ final class DifferentialRevisionCommentListView extends AphrontView { private $handles; private $inlines; private $changesets; - private $user; private $target; private $versusDiffID; private $id; @@ -35,11 +34,6 @@ final class DifferentialRevisionCommentListView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setTargetDiff(DifferentialDiff $target) { $this->target = $target; return $this; diff --git a/src/applications/differential/view/DifferentialRevisionCommentView.php b/src/applications/differential/view/DifferentialRevisionCommentView.php index 7c10f59fe9..0c78345757 100644 --- a/src/applications/differential/view/DifferentialRevisionCommentView.php +++ b/src/applications/differential/view/DifferentialRevisionCommentView.php @@ -10,7 +10,6 @@ final class DifferentialRevisionCommentView extends AphrontView { private $changesets; private $target; private $anchorName; - private $user; private $versusDiffID; public function setComment($comment) { @@ -62,11 +61,6 @@ final class DifferentialRevisionCommentView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function render() { if (!$this->user) { diff --git a/src/applications/differential/view/DifferentialRevisionDetailView.php b/src/applications/differential/view/DifferentialRevisionDetailView.php index ee3e6f7c3b..8c10df749b 100644 --- a/src/applications/differential/view/DifferentialRevisionDetailView.php +++ b/src/applications/differential/view/DifferentialRevisionDetailView.php @@ -4,7 +4,6 @@ final class DifferentialRevisionDetailView extends AphrontView { private $revision; private $actions; - private $user; private $auxiliaryFields = array(); private $diff; @@ -29,14 +28,6 @@ final class DifferentialRevisionDetailView extends AphrontView { return $this->actions; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - private function getUser() { - return $this->user; - } - public function setAuxiliaryFields(array $fields) { assert_instances_of($fields, 'DifferentialFieldSpecification'); $this->auxiliaryFields = $fields; diff --git a/src/applications/differential/view/DifferentialRevisionListView.php b/src/applications/differential/view/DifferentialRevisionListView.php index 30f9de2aef..ac08a9754c 100644 --- a/src/applications/differential/view/DifferentialRevisionListView.php +++ b/src/applications/differential/view/DifferentialRevisionListView.php @@ -9,7 +9,6 @@ final class DifferentialRevisionListView extends AphrontView { private $flags = array(); private $drafts = array(); private $handles; - private $user; private $fields; private $highlightAge; const NO_DATA_STRING = 'No revisions found.'; @@ -47,11 +46,6 @@ final class DifferentialRevisionListView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function loadAssets() { $user = $this->user; if (!$user) { diff --git a/src/applications/differential/view/DifferentialRevisionStatsView.php b/src/applications/differential/view/DifferentialRevisionStatsView.php index b6676c9d4a..34a126774b 100644 --- a/src/applications/differential/view/DifferentialRevisionStatsView.php +++ b/src/applications/differential/view/DifferentialRevisionStatsView.php @@ -7,7 +7,6 @@ final class DifferentialRevisionStatsView extends AphrontView { private $comments; private $revisions; private $diffs; - private $user; private $filter; public function setRevisions(array $revisions) { @@ -33,11 +32,6 @@ final class DifferentialRevisionStatsView extends AphrontView { return $this; } - public function setUser($user) { - $this->user = $user; - return $this; - } - public function render() { $user = $this->user; if (!$user) { diff --git a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php index fb9019e33e..d928747c8c 100644 --- a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php +++ b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php @@ -6,7 +6,6 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView { private $selectedVersusDiffID; private $selectedDiffID; private $selectedWhitespace; - private $user; public function setDiffs(array $diffs) { assert_instances_of($diffs, 'DifferentialDiff'); @@ -29,15 +28,6 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView { return $this; } - public function setUser($user) { - $this->user = $user; - return $this; - } - - public function getUser() { - return $this->user; - } - public function render() { require_celerity_resource('differential-core-view-css'); diff --git a/src/applications/diffusion/view/DiffusionBranchTableView.php b/src/applications/diffusion/view/DiffusionBranchTableView.php index 0ce10bffe9..ee95580932 100644 --- a/src/applications/diffusion/view/DiffusionBranchTableView.php +++ b/src/applications/diffusion/view/DiffusionBranchTableView.php @@ -3,7 +3,6 @@ final class DiffusionBranchTableView extends DiffusionView { private $branches; - private $user; private $commits = array(); public function setBranches(array $branches) { @@ -17,11 +16,6 @@ final class DiffusionBranchTableView extends DiffusionView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function render() { $drequest = $this->getDiffusionRequest(); $current_branch = $drequest->getBranch(); diff --git a/src/applications/diffusion/view/DiffusionBrowseTableView.php b/src/applications/diffusion/view/DiffusionBrowseTableView.php index a5ab00bbfd..6eaf4a1f31 100644 --- a/src/applications/diffusion/view/DiffusionBrowseTableView.php +++ b/src/applications/diffusion/view/DiffusionBrowseTableView.php @@ -4,7 +4,6 @@ final class DiffusionBrowseTableView extends DiffusionView { private $paths; private $handles = array(); - private $user; public function setPaths(array $paths) { assert_instances_of($paths, 'DiffusionRepositoryPath'); @@ -18,11 +17,6 @@ final class DiffusionBrowseTableView extends DiffusionView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public static function renderLastModifiedColumns( DiffusionRequest $drequest, array $handles, diff --git a/src/applications/diffusion/view/DiffusionCommentListView.php b/src/applications/diffusion/view/DiffusionCommentListView.php index 3c940b0a84..bbec8ed0fd 100644 --- a/src/applications/diffusion/view/DiffusionCommentListView.php +++ b/src/applications/diffusion/view/DiffusionCommentListView.php @@ -2,18 +2,12 @@ final class DiffusionCommentListView extends AphrontView { - private $user; private $comments; private $inlineComments = array(); private $pathMap = array(); private $handles = array(); private $markupEngine; - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setComments(array $comments) { assert_instances_of($comments, 'PhabricatorAuditComment'); $this->comments = $comments; diff --git a/src/applications/diffusion/view/DiffusionCommentView.php b/src/applications/diffusion/view/DiffusionCommentView.php index c591f021bb..1b37302b34 100644 --- a/src/applications/diffusion/view/DiffusionCommentView.php +++ b/src/applications/diffusion/view/DiffusionCommentView.php @@ -2,7 +2,6 @@ final class DiffusionCommentView extends AphrontView { - private $user; private $comment; private $commentNumber; private $handles; @@ -12,11 +11,6 @@ final class DiffusionCommentView extends AphrontView { private $inlineComments; private $markupEngine; - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setComment(PhabricatorAuditComment $comment) { $this->comment = $comment; return $this; diff --git a/src/applications/diffusion/view/DiffusionTagListView.php b/src/applications/diffusion/view/DiffusionTagListView.php index 7b286ff2b5..dee0ec3d2a 100644 --- a/src/applications/diffusion/view/DiffusionTagListView.php +++ b/src/applications/diffusion/view/DiffusionTagListView.php @@ -3,15 +3,9 @@ final class DiffusionTagListView extends DiffusionView { private $tags; - private $user; private $commits = array(); private $handles = array(); - public function setUser($user) { - $this->user = $user; - return $this; - } - public function setTags($tags) { $this->tags = $tags; return $this; diff --git a/src/applications/flag/view/PhabricatorFlagListView.php b/src/applications/flag/view/PhabricatorFlagListView.php index f01173f2cb..a1f86d5ffe 100644 --- a/src/applications/flag/view/PhabricatorFlagListView.php +++ b/src/applications/flag/view/PhabricatorFlagListView.php @@ -3,7 +3,6 @@ final class PhabricatorFlagListView extends AphrontView { private $flags; - private $user; public function setFlags(array $flags) { assert_instances_of($flags, 'PhabricatorFlag'); @@ -11,11 +10,6 @@ final class PhabricatorFlagListView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function render() { $user = $this->user; diff --git a/src/applications/herald/view/HeraldRuleEditHistoryView.php b/src/applications/herald/view/HeraldRuleEditHistoryView.php index 0d00dacde4..d931d2b2d6 100644 --- a/src/applications/herald/view/HeraldRuleEditHistoryView.php +++ b/src/applications/herald/view/HeraldRuleEditHistoryView.php @@ -4,7 +4,6 @@ final class HeraldRuleEditHistoryView extends AphrontView { private $edits; private $handles; - private $user; public function setEdits(array $edits) { $this->edits = $edits; @@ -21,11 +20,6 @@ final class HeraldRuleEditHistoryView extends AphrontView { return $this; } - public function setUser($user) { - $this->user = $user; - return $this; - } - public function render() { $rows = array(); diff --git a/src/applications/herald/view/HeraldRuleListView.php b/src/applications/herald/view/HeraldRuleListView.php index ff3dfccaaa..65e0c8d2e0 100644 --- a/src/applications/herald/view/HeraldRuleListView.php +++ b/src/applications/herald/view/HeraldRuleListView.php @@ -7,7 +7,6 @@ final class HeraldRuleListView extends AphrontView { private $showAuthor; private $showRuleType; - private $user; public function setRules(array $rules) { assert_instances_of($rules, 'HeraldRule'); @@ -31,11 +30,6 @@ final class HeraldRuleListView extends AphrontView { return $this; } - public function setUser($user) { - $this->user = $user; - return $this; - } - public function render() { $type_map = HeraldRuleTypeConfig::getRuleTypeMap(); diff --git a/src/applications/maniphest/view/ManiphestTaskListView.php b/src/applications/maniphest/view/ManiphestTaskListView.php index b7a52bfe3e..b27beeb633 100644 --- a/src/applications/maniphest/view/ManiphestTaskListView.php +++ b/src/applications/maniphest/view/ManiphestTaskListView.php @@ -7,7 +7,6 @@ final class ManiphestTaskListView extends ManiphestView { private $tasks; private $handles; - private $user; private $showBatchControls; private $showSubpriorityControls; @@ -23,11 +22,6 @@ final class ManiphestTaskListView extends ManiphestView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setShowBatchControls($show_batch_controls) { $this->showBatchControls = $show_batch_controls; return $this; diff --git a/src/applications/maniphest/view/ManiphestTaskSummaryView.php b/src/applications/maniphest/view/ManiphestTaskSummaryView.php index de0293881c..a3adbab980 100644 --- a/src/applications/maniphest/view/ManiphestTaskSummaryView.php +++ b/src/applications/maniphest/view/ManiphestTaskSummaryView.php @@ -7,7 +7,6 @@ final class ManiphestTaskSummaryView extends ManiphestView { private $task; private $handles; - private $user; private $showBatchControls; private $showSubpriorityControls; @@ -22,11 +21,6 @@ final class ManiphestTaskSummaryView extends ManiphestView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setShowBatchControls($show_batch_controls) { $this->showBatchControls = $show_batch_controls; return $this; diff --git a/src/applications/maniphest/view/ManiphestTransactionDetailView.php b/src/applications/maniphest/view/ManiphestTransactionDetailView.php index 4c8fe1a836..7ed66c4875 100644 --- a/src/applications/maniphest/view/ManiphestTransactionDetailView.php +++ b/src/applications/maniphest/view/ManiphestTransactionDetailView.php @@ -15,7 +15,6 @@ final class ManiphestTransactionDetailView extends ManiphestView { private $renderSummaryOnly; private $renderFullSummary; - private $user; private $auxiliaryFields; @@ -74,11 +73,6 @@ final class ManiphestTransactionDetailView extends ManiphestView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setRangeSpecification($range) { $this->rangeSpecification = $range; return $this; diff --git a/src/applications/maniphest/view/ManiphestTransactionListView.php b/src/applications/maniphest/view/ManiphestTransactionListView.php index 1dbbc27cf3..14bff880e6 100644 --- a/src/applications/maniphest/view/ManiphestTransactionListView.php +++ b/src/applications/maniphest/view/ManiphestTransactionListView.php @@ -7,7 +7,6 @@ final class ManiphestTransactionListView extends ManiphestView { private $transactions; private $handles; - private $user; private $markupEngine; private $preview; private $auxiliaryFields; @@ -24,11 +23,6 @@ final class ManiphestTransactionListView extends ManiphestView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setMarkupEngine(PhabricatorMarkupEngine $engine) { $this->markupEngine = $engine; return $this; diff --git a/src/applications/meta/view/PhabricatorApplicationLaunchView.php b/src/applications/meta/view/PhabricatorApplicationLaunchView.php index fc2a7c251b..ce902c97de 100644 --- a/src/applications/meta/view/PhabricatorApplicationLaunchView.php +++ b/src/applications/meta/view/PhabricatorApplicationLaunchView.php @@ -2,7 +2,6 @@ final class PhabricatorApplicationLaunchView extends AphrontView { - private $user; private $application; private $status; @@ -11,11 +10,6 @@ final class PhabricatorApplicationLaunchView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setApplicationStatus(array $status) { $this->status = $status; return $this; diff --git a/src/applications/metamta/contentsource/PhabricatorContentSourceView.php b/src/applications/metamta/contentsource/PhabricatorContentSourceView.php index b353842371..5cd1278770 100644 --- a/src/applications/metamta/contentsource/PhabricatorContentSourceView.php +++ b/src/applications/metamta/contentsource/PhabricatorContentSourceView.php @@ -3,19 +3,12 @@ final class PhabricatorContentSourceView extends AphrontView { private $contentSource; - private $user; public function setContentSource(PhabricatorContentSource $content_source) { $this->contentSource = $content_source; return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - - public function render() { require_celerity_resource('phabricator-content-source-view-css'); diff --git a/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php b/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php index 47bf46fc34..34aea2791f 100644 --- a/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php +++ b/src/applications/phortune/control/PhortuneMonthYearExpiryControl.php @@ -1,18 +1,9 @@ user = $user; - return $this; - } - private function getUser() { - return $this->user; - } - public function setMonthInputValue($value) { $this->monthValue = $value; return $this; diff --git a/src/applications/phortune/stripe/view/PhortuneStripePaymentFormView.php b/src/applications/phortune/stripe/view/PhortuneStripePaymentFormView.php index 37232e92ef..c55f7030f2 100644 --- a/src/applications/phortune/stripe/view/PhortuneStripePaymentFormView.php +++ b/src/applications/phortune/stripe/view/PhortuneStripePaymentFormView.php @@ -1,20 +1,11 @@ user = $user; - return $this; - } - private function getUser() { - return $this->user; - } - public function setStripeKey($key) { $this->stripeKey = $key; return $this; diff --git a/src/applications/ponder/view/PonderAddAnswerView.php b/src/applications/ponder/view/PonderAddAnswerView.php index 073a2b0e96..a4b199180c 100644 --- a/src/applications/ponder/view/PonderAddAnswerView.php +++ b/src/applications/ponder/view/PonderAddAnswerView.php @@ -3,7 +3,6 @@ final class PonderAddAnswerView extends AphrontView { private $question; - private $user; private $actionURI; private $draft; @@ -12,11 +11,6 @@ final class PonderAddAnswerView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setActionURI($uri) { $this->actionURI = $uri; return $this; diff --git a/src/applications/ponder/view/PonderAddCommentView.php b/src/applications/ponder/view/PonderAddCommentView.php index 7348787809..16a324e7f4 100644 --- a/src/applications/ponder/view/PonderAddCommentView.php +++ b/src/applications/ponder/view/PonderAddCommentView.php @@ -3,7 +3,6 @@ final class PonderAddCommentView extends AphrontView { private $target; - private $user; private $actionURI; private $questionID; @@ -12,11 +11,6 @@ final class PonderAddCommentView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setQuestionID($id) { $this->questionID = $id; return $this; diff --git a/src/applications/ponder/view/PonderAnswerListView.php b/src/applications/ponder/view/PonderAnswerListView.php index 8b6fce58b3..fa42d222a9 100644 --- a/src/applications/ponder/view/PonderAnswerListView.php +++ b/src/applications/ponder/view/PonderAnswerListView.php @@ -4,7 +4,6 @@ final class PonderAnswerListView extends AphrontView { private $question; private $handles; - private $user; private $answers; public function setQuestion($question) { @@ -18,11 +17,6 @@ final class PonderAnswerListView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setAnswers(array $answers) { assert_instances_of($answers, 'PonderAnswer'); diff --git a/src/applications/ponder/view/PonderCommentListView.php b/src/applications/ponder/view/PonderCommentListView.php index 20ac1fc9c8..566a975ef6 100644 --- a/src/applications/ponder/view/PonderCommentListView.php +++ b/src/applications/ponder/view/PonderCommentListView.php @@ -1,18 +1,12 @@ user = $user; - return $this; - } - public function setHandles(array $handles) { assert_instances_of($handles, 'PhabricatorObjectHandle'); $this->handles = $handles; diff --git a/src/applications/ponder/view/PonderPostBodyView.php b/src/applications/ponder/view/PonderPostBodyView.php index 90129a3312..1572687c6e 100644 --- a/src/applications/ponder/view/PonderPostBodyView.php +++ b/src/applications/ponder/view/PonderPostBodyView.php @@ -7,7 +7,6 @@ final class PonderPostBodyView extends AphrontView { private $handles; private $preview; private $anchorName; - private $user; private $action; public function setQuestion($question) { @@ -36,11 +35,6 @@ final class PonderPostBodyView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function render() { if (!$this->user) { diff --git a/src/applications/ponder/view/PonderQuestionDetailView.php b/src/applications/ponder/view/PonderQuestionDetailView.php index 2cb98221fa..01265a66fd 100644 --- a/src/applications/ponder/view/PonderQuestionDetailView.php +++ b/src/applications/ponder/view/PonderQuestionDetailView.php @@ -3,7 +3,6 @@ final class PonderQuestionDetailView extends AphrontView { private $question; - private $user; private $handles; public function setQuestion($question) { @@ -11,11 +10,6 @@ final class PonderQuestionDetailView extends AphrontView { return $this; } - public function setUser($user) { - $this->user = $user; - return $this; - } - public function setHandles($handles) { $this->handles = $handles; return $this; diff --git a/src/applications/ponder/view/PonderQuestionSummaryView.php b/src/applications/ponder/view/PonderQuestionSummaryView.php index 6db364ada2..cc03d6d138 100644 --- a/src/applications/ponder/view/PonderQuestionSummaryView.php +++ b/src/applications/ponder/view/PonderQuestionSummaryView.php @@ -1,7 +1,6 @@ user = $user; - return $this; - } - public function render() { require_celerity_resource('ponder-feed-view-css'); diff --git a/src/applications/ponder/view/PonderUserProfileView.php b/src/applications/ponder/view/PonderUserProfileView.php index f7c002d867..a465e77606 100644 --- a/src/applications/ponder/view/PonderUserProfileView.php +++ b/src/applications/ponder/view/PonderUserProfileView.php @@ -1,7 +1,6 @@ user = $user; - return $this; - } - public function setQuestionOffset($offset) { $this->questionoffset = $offset; return $this; diff --git a/src/applications/xhprof/view/PhabricatorXHProfSampleListView.php b/src/applications/xhprof/view/PhabricatorXHProfSampleListView.php index 5b525ccf73..db08dfbbfc 100644 --- a/src/applications/xhprof/view/PhabricatorXHProfSampleListView.php +++ b/src/applications/xhprof/view/PhabricatorXHProfSampleListView.php @@ -3,7 +3,6 @@ final class PhabricatorXHProfSampleListView extends AphrontView { private $samples; - private $user; private $showType = false; public function setSamples(array $samples) { @@ -12,11 +11,6 @@ final class PhabricatorXHProfSampleListView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setShowType($show_type) { $this->showType = $show_type; } diff --git a/src/view/AphrontDialogView.php b/src/view/AphrontDialogView.php index 1de2e003e6..266286cef2 100644 --- a/src/view/AphrontDialogView.php +++ b/src/view/AphrontDialogView.php @@ -7,7 +7,6 @@ final class AphrontDialogView extends AphrontView { private $cancelURI; private $cancelText = 'Cancel'; private $submitURI; - private $user; private $hidden = array(); private $class; private $renderAsForm = true; @@ -18,11 +17,6 @@ final class AphrontDialogView extends AphrontView { const WIDTH_FORM = 'form'; const WIDTH_FULL = 'full'; - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setSubmitURI($uri) { $this->submitURI = $uri; return $this; diff --git a/src/view/AphrontView.php b/src/view/AphrontView.php index 889059892e..c39a729413 100644 --- a/src/view/AphrontView.php +++ b/src/view/AphrontView.php @@ -2,8 +2,18 @@ abstract class AphrontView extends Phobject { + protected $user; protected $children = array(); + public function setUser(PhabricatorUser $user) { + $this->user = $user; + return $this; + } + + protected function getUser() { + return $this->user; + } + protected function canAppendChild() { return true; } diff --git a/src/view/form/AphrontFormView.php b/src/view/form/AphrontFormView.php index 01a5e2d4e0..a1e18a184b 100644 --- a/src/view/form/AphrontFormView.php +++ b/src/view/form/AphrontFormView.php @@ -7,7 +7,6 @@ final class AphrontFormView extends AphrontView { private $header; private $data = array(); private $encType; - private $user; private $workflow; private $id; private $flexible; @@ -23,11 +22,6 @@ final class AphrontFormView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setAction($action) { $this->action = $action; return $this; diff --git a/src/view/form/control/AphrontFormDateControl.php b/src/view/form/control/AphrontFormDateControl.php index ba002fee2a..4d398f2fa5 100644 --- a/src/view/form/control/AphrontFormDateControl.php +++ b/src/view/form/control/AphrontFormDateControl.php @@ -2,7 +2,6 @@ final class AphrontFormDateControl extends AphrontFormControl { - private $user; private $initialTime; private $valueDay; @@ -15,11 +14,6 @@ final class AphrontFormDateControl extends AphrontFormControl { const TIME_START_OF_BUSINESS = 'start-of-business'; const TIME_END_OF_BUSINESS = 'end-of-business'; - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setInitialTime($time) { $this->initialTime = $time; return $this; diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php index 4f22da2d48..fc59cba1c1 100644 --- a/src/view/form/control/AphrontFormPolicyControl.php +++ b/src/view/form/control/AphrontFormPolicyControl.php @@ -2,20 +2,10 @@ final class AphrontFormPolicyControl extends AphrontFormControl { - private $user; private $object; private $capability; private $policies; - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - - public function getUser() { - return $this->user; - } - public function setPolicyObject(PhabricatorPolicyInterface $object) { $this->object = $object; return $this; diff --git a/src/view/form/control/AphrontFormTokenizerControl.php b/src/view/form/control/AphrontFormTokenizerControl.php index d0131ab541..89d4465224 100644 --- a/src/view/form/control/AphrontFormTokenizerControl.php +++ b/src/view/form/control/AphrontFormTokenizerControl.php @@ -5,7 +5,6 @@ final class AphrontFormTokenizerControl extends AphrontFormControl { private $datasource; private $disableBehavior; private $limit; - private $user; private $placeholder; public function setDatasource($datasource) { @@ -27,11 +26,6 @@ final class AphrontFormTokenizerControl extends AphrontFormControl { return $this; } - public function setUser($user) { - $this->user = $user; - return $this; - } - public function setPlaceholder($placeholder) { $this->placeholder = $placeholder; return $this; diff --git a/src/view/form/control/PhabricatorRemarkupControl.php b/src/view/form/control/PhabricatorRemarkupControl.php index 70b44c8fad..ac238426ec 100644 --- a/src/view/form/control/PhabricatorRemarkupControl.php +++ b/src/view/form/control/PhabricatorRemarkupControl.php @@ -2,17 +2,6 @@ final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl { - private $user; - - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - - public function getUser() { - return $this->user; - } - protected function renderInput() { $id = $this->getID(); if (!$id) { diff --git a/src/view/layout/AphrontSideNavFilterView.php b/src/view/layout/AphrontSideNavFilterView.php index 574f9f31ef..e51beab916 100644 --- a/src/view/layout/AphrontSideNavFilterView.php +++ b/src/view/layout/AphrontSideNavFilterView.php @@ -23,7 +23,6 @@ final class AphrontSideNavFilterView extends AphrontView { private $selectedFilter = false; private $flexNav; private $flexible; - private $user; private $active; private $menu; private $crumbs; @@ -53,11 +52,6 @@ final class AphrontSideNavFilterView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setFlexNav($flex_nav) { $this->flexNav = $flex_nav; return $this; diff --git a/src/view/layout/PhabricatorActionListView.php b/src/view/layout/PhabricatorActionListView.php index ff9c0109b8..c09b6dc454 100644 --- a/src/view/layout/PhabricatorActionListView.php +++ b/src/view/layout/PhabricatorActionListView.php @@ -4,18 +4,12 @@ final class PhabricatorActionListView extends AphrontView { private $actions = array(); private $object; - private $user; public function setObject(PhabricatorLiskDAO $object) { $this->object = $object; return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function addAction(PhabricatorActionView $view) { $this->actions[] = $view; return $this; diff --git a/src/view/layout/PhabricatorActionView.php b/src/view/layout/PhabricatorActionView.php index 3b94243ee6..c148cc380d 100644 --- a/src/view/layout/PhabricatorActionView.php +++ b/src/view/layout/PhabricatorActionView.php @@ -3,7 +3,6 @@ final class PhabricatorActionView extends AphrontView { private $name; - private $user; private $icon; private $href; private $disabled; @@ -40,11 +39,6 @@ final class PhabricatorActionView extends AphrontView { return $this; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function render() { $icon = null; diff --git a/src/view/layout/PhabricatorTransactionView.php b/src/view/layout/PhabricatorTransactionView.php index 0ee7f76fda..4e6ab0d4ca 100644 --- a/src/view/layout/PhabricatorTransactionView.php +++ b/src/view/layout/PhabricatorTransactionView.php @@ -2,7 +2,6 @@ final class PhabricatorTransactionView extends AphrontView { - private $user; private $imageURI; private $actions = array(); private $epoch; @@ -12,11 +11,6 @@ final class PhabricatorTransactionView extends AphrontView { private $isPreview; private $classes = array(); - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setImageURI($uri) { $this->imageURI = $uri; return $this; diff --git a/src/view/layout/headsup/AphrontHeadsupActionView.php b/src/view/layout/headsup/AphrontHeadsupActionView.php index a7bff0ebc4..6371be8698 100644 --- a/src/view/layout/headsup/AphrontHeadsupActionView.php +++ b/src/view/layout/headsup/AphrontHeadsupActionView.php @@ -7,7 +7,6 @@ final class AphrontHeadsupActionView extends AphrontView { private $uri; private $workflow; private $instant; - private $user; public function setName($name) { $this->name = $name; @@ -34,11 +33,6 @@ final class AphrontHeadsupActionView extends AphrontView { return $this; } - public function setUser($user) { - $this->user = $user; - return $this; - } - public function render() { if ($this->instant) { $button_class = $this->class.' link'; diff --git a/src/view/page/menu/PhabricatorMainMenuSearchView.php b/src/view/page/menu/PhabricatorMainMenuSearchView.php index 3acfab603f..e3108e9805 100644 --- a/src/view/page/menu/PhabricatorMainMenuSearchView.php +++ b/src/view/page/menu/PhabricatorMainMenuSearchView.php @@ -2,15 +2,9 @@ final class PhabricatorMainMenuSearchView extends AphrontView { - private $user; private $scope; private $id; - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - public function setScope($scope) { $this->scope = $scope; return $this; diff --git a/src/view/page/menu/PhabricatorMainMenuView.php b/src/view/page/menu/PhabricatorMainMenuView.php index 0a0a2efb21..f3c3596719 100644 --- a/src/view/page/menu/PhabricatorMainMenuView.php +++ b/src/view/page/menu/PhabricatorMainMenuView.php @@ -2,7 +2,6 @@ final class PhabricatorMainMenuView extends AphrontView { - private $user; private $defaultSearchScope; private $controller; private $applicationMenu; @@ -34,15 +33,6 @@ final class PhabricatorMainMenuView extends AphrontView { return $this->defaultSearchScope; } - public function setUser(PhabricatorUser $user) { - $this->user = $user; - return $this; - } - - public function getUser() { - return $this->user; - } - public function render() { $user = $this->user;