Download the PHP package momocode/shopware-5-plugin-base without Composer

On this page you can find all versions of the php package momocode/shopware-5-plugin-base. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package shopware-5-plugin-base

Shopware 5 plugin base

This library contains abstractions that may be useful in all custom plugins. It provides following features:

Installation

Require the composer package in your plugin first:

Add composer autoloader to plugin bootstrap class and let your plugin inherit the abstraction

Migrations

To perform migrations on plugin installation and update, you can profit from the plugin base file which autoloads the migration files on installation or update. To use them you have to place your migration files in the Migration folder of your plugin.

Attribute Migration

Here is an example for an attribute migration file inherited from the AbstractAttributeMigration in the Migration/Attribute folder in your plugin. It is important that the file and class has the suffix "Migration" in the name. The plugin base class will find this migration file and on plugin installation it will create all attributes which are required for the installed version and on plugin update it will create or update only the attributes for the new version.

Emotion Widgets

This library provides an abstraction for emotion widgets. It encapsulates installation and update routines. In the plugin base file Widgets are automatically installed and updated, if they are in the folder Widgets and if the file and class name ends with Widget. Here is an example of a widget class in your plugins Widgets folder:

The defined fields in the getWidgetFields() function are installed ... The updateWidget() function is called on plugin updates and there you can perform this operations depending on the new plugin version:

Add new field

Add your field to the getWidgetFields() function and add this to the updateWidget() function if you want to add the field for example in plugin version 1.0.1:

Update field

Update your field in the getWidgetFields() function and add this to the updateWidget() function if you want to update the field for example in plugin version 1.0.1:

Remove field

Remove your field from the getWidgetFields() function and add this to the updateWidget() function if you want to remove the field for example in plugin version 1.0.1:

Template Data
Service Definition

We need to create the service definition and tag it as a subscriber so the widget can register the backend template and transform the frontend template data on request.

Now you need this three files in the path you defined in your widget class in the getBackendJsPath() function:

bootstrap.js:

Adds the other both files to the backend template.

Emotion.view.components.MailjetBuiltInWidget.js:

In the alias the part after widget. must be the same as you defined in your widget class in the getXType() function.

Emotion.view.detail.elements.MailjetBuiltInWidget.js:

In the alias the part after widget.detail-element- must be the same as you defined in your widget class in the getXType() function.

On top of that you need a frontend template file for your widget in your theme or also in your plugins views directory. It must be placed in the widgets/emotion/components folder and named as you defined in the getWidgetOptions() functions template attribute. Here is an example:

mailjet_built_in_widget.tpl

At least you need a subscriber to register the view path of your plugin:


All versions of shopware-5-plugin-base with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package momocode/shopware-5-plugin-base contains the following files

Loading the files please wait ....