2018-02-14 08:30:39 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace cgoIT\rateit;
|
|
|
|
|
|
|
|
use Contao\CoreBundle\ContaoCoreBundle;
|
|
|
|
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
|
|
|
|
use Contao\ManagerPlugin\Bundle\BundlePluginInterface;
|
|
|
|
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;
|
2018-02-15 06:14:26 +01:00
|
|
|
use Symfony\Component\Config\Loader\LoaderResolverInterface;
|
|
|
|
use Symfony\Component\HttpKernel\KernelInterface;
|
2018-02-14 08:30:39 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Plugin for the Contao Manager.
|
|
|
|
*
|
|
|
|
* @author Carsten Götzinger
|
|
|
|
*/
|
|
|
|
class ContaoManagerPlugin implements BundlePluginInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function getBundles(ParserInterface $parser)
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
BundleConfig::create(CgoITRateItBundle::class)
|
|
|
|
->setLoadAfter([ContaoCoreBundle::class])
|
|
|
|
->setReplace(['rate-it']),
|
|
|
|
];
|
|
|
|
}
|
2018-02-15 06:14:26 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function getRouteCollection(LoaderResolverInterface $resolver, KernelInterface $kernel)
|
|
|
|
{
|
|
|
|
return $resolver
|
|
|
|
->resolve(__DIR__.'/Resources/config/routing.yml')
|
|
|
|
->load(__DIR__.'/Resources/config/routing.yml')
|
|
|
|
;
|
|
|
|
}
|
2018-02-14 08:30:39 +01:00
|
|
|
}
|