Extending Models
Permalink
How can you extend a model permanently from a package, or can the model only be extended within the package part?
Will this only work from within the package, and once I leave the package, and it's relevant blocks, I go back to using the core/model one?
$pkg = Package::getByHandle($this->pkgHandle); $objEnv = Environment::get(); $objEnv->overrideCoreByPackage('models/block_types.php', $pkg);
Will this only work from within the package, and once I leave the package, and it's relevant blocks, I go back to using the core/model one?
Then extend it as required or override it.
Rony