Download the PHP package swissup/core without Composer
On this page you can find all versions of the php package swissup/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package core
Short Description Swissup core module. It's purpose is to add menu and config placeholders
License OSL-3.0
Informations about the package core
Core
Contents
- Installation
- Swissup Installer Usage
- Swissup Upgrade Class
- Popup Message Manager
Installation
Swissup Installer Usage
Swissup installer is a class that collects Swissup Upgrades from all module dependencies and run them, if needed.
Lets see the example of how the Argento theme installer is working:
What does this code do?
- Create
Swissup\Core\Model\Module
object. - Load module info for
Swissup_ArgentoDefault
module fromcomposer.json
file. - Set the store to use (All Stores).
- Run installer:
- Search for Swissup\Upgrade classes for all
depends of
Swissup_ArgentoDefault
module. - Run
getOperations
andup
command for each of the found upgrade class. - Run
getOperations
andup
command ofSwissup_ArgentoDefault
upgrade class.
- Search for Swissup\Upgrade classes for all
depends of
Swissup Upgrade Class
When module or theme needs to run some extra logic for specified store views,
it's very handy to use Swissup\Upgrade
class, which allows to create and
automatically backup various content types and configuration.
Why not to use Magento DataUpgrade?
- It does not allow to run upgrade multiple times (reinstall)
- It does not have built-in methods to change store configuration
- It does not support content backups
Swissup upgrades — are migrations, located at <module_dir>/Upgrades
directory.
Upgrade class must implement Swissup\Core\Api\Data\ModuleUpgradeInterface
.
Upgrade examples:
Upgrade naming conventions
Class example:
Supported Commands
Key/ClassName | Description |
---|---|
Configuration | Update store configuration |
CmsBlock | Create/backup cms blocks |
CmsPage | Create/backup cms pages |
Easyslide | Create slider if it does not exists |
ProductAttribute | Create attribute if it does not exists |
Easybanner | Create placeholders and banners |
Products | Create featured, new, special, and any other products |
Popup Message Manager
Popup message manager allows to show regular Magento messages with additional information in popup window.
Usage example
Inject \Swissup\Helper\PopupMessageManager
component into your controller
action and use it instead of built-in \Magento\Framework\Message\Manager
: