In its current state, there isn't a way to retrieve all libraries with a given module through drupal_get_library. Module like jQuery Plugin Handler and jQ will need this type of functionality.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | drupal.get-library.14.patch | 3.47 KB | sun |
| #11 | 714382.patch | 2.57 KB | robloach |
| #10 | 714382.patch.txt | 2.57 KB | robloach |
| #7 | 714382.patch | 2.46 KB | robloach |
| library.patch | 2.88 KB | robloach |
Comments
Comment #1
retester2010 commentedlibrary.patch queued for re-testing.
Comment #3
aspilicious commentedThis function is completly rewritten, still an issue?
Comment #4
robloachYup, unfortunately. In its current state, we can't get any library information if you don't know the owning module and library name.
Comment #5
aspilicious commentedCan you rewrite the patch matching the current function? Please?
Comment #6
sunRob, can you re-roll this patch? Looks pretty much ready to me.
Comment #7
robloachBot?
Comment #9
sunMissing argument 2 for drupal_get_library(), called in modules/simpletest/tests/common.test on line 1382
Comment #10
robloachWhoops, forgot = NULL....
Comment #11
robloachUhh, whoops * 2.
Comment #12
sun"By default, all libraries defined by $module are returned."
@return also needs a slight adjustment.
Why did you remove this? The comment is still valid, so let's keep it.
Don't we have a test for retrieving libraries already? We can add those 4 lines to the existing. No need to setup an entirely new test environment for that.
Powered by Dreditor.
Comment #13
sunAlso, what happens if you pass a $module that does not implement hook_library()? The test should check that, too.
Comment #14
sunI think I'm going to need this for Libraries API, so here's a complete patch, incorporating all of the above feedback.
Comment #15
robloachSmall patch that adds much needed functionality. Also comes with passing tests! RTBC.
Comment #16
webchickLooks like a nice, small, non-BC breaking change to add in some needed functionality. Appreciate the tests, too.
Committed to HEAD. Thanks!