Allow CelerityResourceResponse to hold resources from multiple maps

Summary:
Ref T4222. Currently, CelerityResourceResponse holds response resources in flat maps. Instead, specify which map resources appear in.

Also, provide `requireResource()` and `initBehavior()` APIs on the Controller and View base classes. These provide a cleaner abstraction over `require_celerity_resource()` and `Javelin::initBehavior()`, but are otherwise the same. Move a few callsites over.

Test Plan:
  - Reloaded pages.
  - Browsed around Differential.

Reviewers: btrahan, hach-que

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4222

Differential Revision: https://secure.phabricator.com/D7876
This commit is contained in:
epriestley
2014-01-02 11:59:35 -08:00
parent 09341be10f
commit 31b6f69ff7
18 changed files with 146 additions and 53 deletions

View File

@@ -408,4 +408,9 @@ abstract class PhabricatorController extends AphrontController {
return array($can_act, $message);
}
public function getDefaultResourceSource() {
return 'phabricator';
}
}