Page MenuHomePhabricator

Allow CelerityResourceResponse to hold resources from multiple maps
ClosedPublic

Authored by epriestley on Jan 1 2014, 4:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 9:48 PM
Unknown Object (File)
Sun, Apr 21, 3:47 PM
Unknown Object (File)
Wed, Apr 17, 2:43 PM
Unknown Object (File)
Thu, Apr 11, 7:13 AM
Unknown Object (File)
Tue, Apr 9, 5:28 AM
Unknown Object (File)
Mon, Apr 1, 10:50 PM
Unknown Object (File)
Mar 27 2024, 8:38 PM
Unknown Object (File)
Mar 22 2024, 9:22 PM
Subscribers

Details

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.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I can help with the require_celerity_resource => requireResource() and Javelin::initBehavior() => initBehavior() if you like.

I don't think it's hugely important, I mostly wanted to just put enough of them in to make sure it works. But feel free to run with it if you're feeling like grinding some stuff out. The only gotcha is to make sure the callsite is in a View or Controller before converting it, but 95% of them should be (some cases like Remarkup rules or Phame templates might not be).