# Plugins

The **Shopware 6 Plugin System** is a flexible and modular system that allows developers to add functionalities to the Shopware platform or extend existing features. It is based on the Symfony framework and follows modern PHP standards.

### Target systems

Shopware plugins can only be used in a self hosted or PaaS (Cloud) environment. It is not possible to use a plugin in a SaaS (Cloud) environment.

### **Core Features of the Shopware 6 Plugin System**:

1. **Modularity**
   * Plugins can be developed, installed, and updated independently.
   * Extensions do not directly modify the core but instead enhance or modify specific areas.
2. **Two Main Types of Extensions**
   * **Apps**: Platform-independent extensions that interact with Shopware via API without directly modifying the code.
   * **Plugins**: PHP-based extensions that deeply integrate with the system and can modify core functionalities.
3. **Symfony Event System & Hooks**
   * Plugins utilize the **event listener system** to influence existing processes or add custom logic.
   * **Subscribers** can hook into events to extend order processes or modify the frontend.
4. **Dependency Injection (DI)**
   * The plugin system uses Symfony's DI container to manage services efficiently and flexibly.
5. **Database Extensions with Migrations**
   * Plugins can add custom database tables or fields using **migration scripts**.
6. **Theme Customization & Twig Templates**
   * Plugins can modify the frontend by adding custom templates, blocks, or Twig-based enhancements.
7. **Management via the Shopware Admin Panel**
   * Plugins can be easily installed, activated, and configured through the **Admin Panel**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.premsoft.de/en/plugins.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
