Document just-in-time methods for handles

Summary: Fixes T7689. I'm not going to go clean up all the rest of the `loadViewerHandles()` calls right now since a lot of them are kind of a pain and they aren't really hurting anything so it doesn't feel very leveraged, but at least deprecate it and document the new hotness.

Test Plan:
have a look
in a book
reading rainbow

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7689

Differential Revision: https://secure.phabricator.com/D12343
This commit is contained in:
epriestley
2015-04-10 10:17:53 -07:00
parent 26f7b69ab2
commit 3c254469c9
2 changed files with 106 additions and 0 deletions

View File

@@ -427,6 +427,11 @@ abstract class PhabricatorController extends AphrontController {
return $response;
}
/**
* WARNING: Do not call this in new code.
*
* @deprecated See "Handles Technical Documentation".
*/
protected function loadViewerHandles(array $phids) {
return id(new PhabricatorHandleQuery())
->setViewer($this->getRequest()->getUser())