-
☆ A M B ☆
- 2,475 Posts
I may have asked this before, but how can someone install a MODX package programmatically? It's easy enough to get the package zip file into place, but then what? It'd be really handy to get that streamlined so new installs could come online with all the packages needed -- WordPress just came out with a "Favorite Plugin" feed thing that streamlines this in the manager... kinda slick.
I'm eyeballing the modTransportPackage class and the processors/workspace/packages/install.class.php... but that's a slow burn. Anyone have any pointers?
The latest version of MyComponent has code to do this.
The best way to see it is to use the Example extra that comes with it. Put a package or two in the assets\mycomponents\example\_build\subpackages\ directory and run Build. Then look at the code in the package resolvers in the assets\mycomponents\example\_build\resolvers\packages directory.
I'm working on an extra that actually downloads the packages from the MODX repo to the core/packages directory, but it will be a while before it sees the light of day.