dustin/shopware-utils
  • dustin/shopware-utils
  • Installation
    • Installation
  • Bundles
    • Plugins and AdditionalBundles
      • Create plugin
      • Add additional bundles
    • Themes
  • Migrations
  • Features
    • Configuration
  • Adding resources
    • Custom fields
    • Document types
    • Payment methods
    • Mail template types
    • Mail templates
Powered by GitBook
On this page
  • ThemeInterface
  • Create a theme
  1. Bundles

Themes

PreviousAdd additional bundlesNextMigrations

Last updated 2 months ago

Plugins and AdditionalBundles can bring themes which will automatically be installed. You can add one theme per bundle. So you can provide multiple themes in one plugin with the help of AdditionalBundles.

If you want to provide a theme with an AdditionalBundle the subdirectory of the bundle must be identical to it's name. So if the name of your bundle is FooBundle it must be found in the FooBundle/-subdirectory within your plugin directory.

ThemeInterface

A plugin or bundle must implement the empty ThemeInterface to be known as a theme:

<?php

namespace Foo\Bar;

use Dustin\ShopwareUtils\Core\Framework\Plugin;
use Shopware\Storefront\Framework\ThemeInterface;

class FooBar extends Plugin implements ThemeInterface
{
}
<?php

namespace Foo\Bundle;

use Dustin\ShopwareUtils\Core\Framework\AdditionalBundle;
use Shopware\Storefront\Framework\ThemeInterface;

class FooBundle extends AdditionalBundle implements ThemeInterface 
{
}

Create a theme

If you want to know how to create a theme take a look into the Shopware documentation:

Theme Base Guide | Shopware Documentation
Logo