Download the PHP package prestashop/module-lib-mbo-installer without Composer
On this page you can find all versions of the php package prestashop/module-lib-mbo-installer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download prestashop/module-lib-mbo-installer
More information about prestashop/module-lib-mbo-installer
Files in prestashop/module-lib-mbo-installer
Package module-lib-mbo-installer
Short Description A helper to ease the download PS MBO from the Addons Marketplace
License AFL-3.0
Informations about the package module-lib-mbo-installer
EDIT 09/01/2023
PrestaShop module dependencies library
The goal of this package is to help managing module dependencies.
Let's explain it with an actual case
Supposing our module needs modules A and B to work properly.
We will have to install this module-lib-mbo-installer
and have a file named module_dependencies.json
in the root folder of our module containing
The lib will start by checking if PS MBO (Marketplace in the Back Office) is installed and enabled.
MBO needs to be installed first because we download other modules from the marketplace.
Then it will check for the modules A and B
Installation
Version Guidance
Version | Status | Packagist - | Namespace | Repo | Docs | PHP Version |
---|---|---|---|---|---|---|
1.x | Latest | prestashop/module-lib-mbo-installer |
Prestashop\ModuleLibMboInstaller |
v1.x | N/A | >=5.6 |
Usage
You have 2 methods available
-
DependenciesBuilder::handleDependencies() : this method will return you the status of all the dependencies, including MBO, in an array
- DependenciesBuilder::areDependenciesMet() : this method will return you whether all the dependencies, including MBO, are installed and enabled
These 2 methods will help you gather informations about your dependencies and allow you to perform actions to resolve them.
Examples of implementation
In most of the cases you'll want to show the dependencies of your module in the configuration page, to allow the "user" to fix them
You can use one of the examples above in the getContent
method of your module's main file
Use the given public CDC
In your module
In the template
This example uses our public CDC which will display a page with the status of the dependencies and an action button to resolve them all
Do it yourself
In your module
In the template