Download the PHP package shopsys/plugin-interface without Composer

On this page you can find all versions of the php package shopsys/plugin-interface. 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 plugin-interface

Shopsys Plugin Interface

Downloads

Package of interfaces providing compatibility between Shopsys Platform and plugins.

This repository is maintained by monorepo CHANGELOG.md.

Features

This package contains interfaces responsible for general functionality usable in almost any plugin. For specific functionality, such as generating product feeds, there are separate repositories.

Example

For example usage see the AcmeProductCrudExtension in the CRUD extension section below.

Storing data

Best way to store your plugin data is to use Doctrine entities. Create a folder (e.g. src/Entity) in your plugin and put your entities there. Then you need to create DoctrineOrmMappingPass and add it as CompilerPass in your YourBundleNameBundle class. This can be done like this:

This tells Doctrine where to look for your entities. Now you can create Repository and manage your data as you are used to.

CRUD extension

Sometimes your plugin needs some extra information to be included in an entity, for example, you need to track the weight of products. This can be solved by extending the entity CRUD model with your custom sub-form.

To do so you should implement tag the service in a DI container with shopsys.crud_extension tag. The tag should have a type attribute defining which CRUD model should be extended (eg. "product").

Each form extension has its label, form type and methods for managing the form data.

Example

Demo Data

In order to enable easy testing or to demonstrate usage of your plugin, you might want to provide demonstrational data with it. In that case, you should implement PluginDataFixtureInterface that will take care of loading demonstrational data into the core.

All you got to do is to implement PluginDataFixtureInterface::load() method and tag the service in a DI container with shopsys.data_fixture tag.

Example

CRON modules

When your plugin needs to execute some task periodically, for example downloading currency exchange rates every six hours, you can use a CRON module.

There are 2 types of CRON module interfaces:

You can implement either one of these interfaces and tag the service in a DI container with shopsys.cron tag.

CRON modules are started automatically every time the current system time matches the specified mask in the tag attributes hours and minutes.

Example

How to implement a plugin

Plugins are implemented in a form of a Symfony bundle. For tips on how to write a new bundle see Best Practices for Reusable Bundles.

Contributing

Thank you for your contributions to Shopsys Plugin Interface package. Together we are making Shopsys Platform better.

This repository is READ-ONLY. If you want to report issues and/or send pull requests, please use the main Shopsys repository.

Please, check our Contribution Guide before contributing.

Support

What to do when you are in troubles or need some help? The best way is to join our Slack.

If you want to report issues, please use the main Shopsys repository.


All versions of plugin-interface 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 shopsys/plugin-interface contains the following files

Loading the files please wait ....