An open API service indexing awesome lists of open source software.

https://github.com/contao/manager-plugin

Contao Manager Plugin
https://github.com/contao/manager-plugin

cms contao contao-manager php plugin

Last synced: 9 months ago
JSON representation

Contao Manager Plugin

Awesome Lists containing this project

README

          

# Contao manager plugin

[![](https://img.shields.io/packagist/v/contao/manager-plugin.svg?style=flat-square)](https://packagist.org/packages/contao/manager-plugin)
[![](https://img.shields.io/packagist/dt/contao/manager-plugin.svg?style=flat-square)](https://packagist.org/packages/contao/manager-plugin)

The Contao managed edition is a self-configuring application, which registers
bundles automatically based on their plugin class. The Contao manager bundle
is required to create this class.

## The plugin class

It is recommended to create the plugin in `src/ContaoManager/Plugin.php`.

```php
=3.0"
},
"extra": {
"contao-manager-plugin": "Vendor\\SomeBundle\\ContaoManager\\Plugin"
}
}
```

## Registering bundles

If your bundle uses other bundles, which are not yet registered in the kernel,
you can add them by implementing the `BundlePluginInterface` interface. The
following example registers the `KnpMenuBundle` class:

```php
load('@VendorSomeBundle/Resources/config/config.yml');
}
}
```

You can also add a configuration in a specific environment only:

```php
load(
function (ContainerBuilder $container) use ($loader) {
if ('dev' === $container->getParameter('kernel.environment')) {
$loader->load('@VendorSomeBundle/Resources/config/config_dev.yml');
}
}
);
}
}
```

This is the equivalent of adjusting the `app/config/config.yml` file of a
regular Symfony application.

## Adding custom routes

If your bundle adds custom routes to the Symfony router, you can implement the
`RoutingPluginInterface` interface.

```php
resolve($file)->load($file);
}
}
```

This is the equivalent of adjusting the `app/config/routing.yml` file of a
regular Symfony application.

## Loading dependencies

If your bundle depends on one or more other bundles to be loaded first, so it
can override certain parts of them, you can ensure that these bundles are
loaded first by implementing the `DependentPluginInterface`.

```php