Can a package override the core functionality?
Specifically, I need to override some of the default models/ and libraries/. Anyone have any experience or success in doing so?
Ehrm.. that's what those empty folder are for outside of the concrete/ folder..
And yes c5 you can replace single_pages etc. via packages, but that's limited. So if you want to hack around. Those empty folder are where you start. Create a copy of the core file and drop it into the empty dir then start hacking around. C5 will pick your file first instead of the core file.
Appreciate the quick response.
I'm actually pretty well tenured in working with C5, so I'm aware of how the directory structure works and the process of overriding core files. But, the package I'm developing needs to extend/modify - more or less - all of the functionality for handling files in C5. (I'm trying to extend C5 to store files on Amazon S3).
I thought that the dispatcher actually checked packages before the mirrored parent directory for files to override, but it doesn't seem to work for me.
If you've done it from a package, what'd you do?
As said. Packages are meant to extend c5 with Addons, that's why they can't replace everything inside /concrete, but some of its functionality.
Example package directory:
that's all possible in Packages too.
Specifically I need to override the File and FileVersion core models. Thats really it.
just create a models dir in your package then place your modified file into that dir.
If you want to use it internally from within the package you need to tell c5 where it is like: Loader::model('file','my_package');