Skip to content

Commit

Permalink
Merge pull request #56 from w-vision/dependant-bundles
Browse files Browse the repository at this point in the history
Use DependantBundle that will be introduced in beta-1 from coreshop-resource-bundle
  • Loading branch information
dpfaffenbauer authored Apr 11, 2018
2 parents 12456f6 + c2f8b24 commit e6cf8ef
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 25 deletions.
21 changes: 2 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,8 @@ Import Definitions allows you to define your Object Import using a nice GUI and

* Since Import-Definitions depends on CoreShops ResourceBundle, and the ResourceBundle only exists in DEV yet, you need to set your "minimum-stability" to "dev" in your composer.json
* Install via composer ```composer require w-vision/import-definitions:^2.0-dev```
* Load needed Bundles:
```php
<?php

// app/AppKernel.php
public function registerBundlesToCollection(BundleCollection $collection)
{
$collection->addBundles(array(
new \JMS\SerializerBundle\JMSSerializerBundle(),
new \CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle(),
new \FOS\RestBundle\FOSRestBundle(),
new \Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle(),
new \Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle()
), 120);
}
```
* Enable Bundle by running ```bin/console pimcore:bundle:enable ImportDefinitionsBundle```
* Clear Cache by running ```bin/console cache:clear --no-warmup```
* Install Bundle by running ```bin/console pimcore:bundle:install ImportDefinitionsBundle```
* Enable via command-line (or inside the pimcore extension manager): ```bin/console pimcore:bundle:enable ImportDefinitionsBundle```
* Install via command-line (or inside the pimcore extension manager): ```bin/console pimcore:bundle:install ImportDefinitionsBundle```
* Reload Pimcore
* Open Settings -> Import Definitions

Expand Down
73 changes: 67 additions & 6 deletions src/ImportDefinitionsBundle/ImportDefinitionsBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,40 @@

namespace ImportDefinitionsBundle;

use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use CoreShop\Bundle\ResourceBundle\AbstractResourceBundle;
use CoreShop\Bundle\ResourceBundle\ComposerPackageBundleInterface;
use CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle;
use ImportDefinitionsBundle\DependencyInjection\Compiler\CleanerRegistryCompilerPass;
use ImportDefinitionsBundle\DependencyInjection\Compiler\FilterRegistryCompilerPass;
use ImportDefinitionsBundle\DependencyInjection\Compiler\InterpreterRegistryCompilerPass;
use ImportDefinitionsBundle\DependencyInjection\Compiler\ProviderRegistryCompilerPass;
use ImportDefinitionsBundle\DependencyInjection\Compiler\RunnerRegistryCompilerPass;
use ImportDefinitionsBundle\DependencyInjection\Compiler\SetterRegistryCompilerPass;
use Pimcore\Extension\Bundle\PimcoreBundleInterface;
use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class ImportDefinitionsBundle extends AbstractPimcoreBundle
class ImportDefinitionsBundle extends AbstractResourceBundle implements PimcoreBundleInterface, ComposerPackageBundleInterface
{
use PackageVersionTrait;
use PackageVersionTrait;

/**
* {@inheritdoc}
*/
public function getPackageName()
{
return 'w-vision/import-definitions';
}

/**
* {@inheritdoc}
*/
public function getSupportedDrivers()
{
return [
CoreShopResourceBundle::DRIVER_PIMCORE,
];
}

/**
* {@inheritdoc}
Expand Down Expand Up @@ -65,4 +86,44 @@ public function getInstaller()
{
return $this->container->get(Installer::class);
}
}

/**
* {@inheritdoc}
*/
public function getAdminIframePath()
{
return null;
}

/**
* {@inheritdoc}
*/
public function getJsPaths()
{
return [];
}

/**
* {@inheritdoc}
*/
public function getCssPaths()
{
return [];
}

/**
* {@inheritdoc}
*/
public function getEditmodeJsPaths()
{
return [];
}

/**
* {@inheritdoc}
*/
public function getEditmodeCssPaths()
{
return [];
}
}

0 comments on commit e6cf8ef

Please sign in to comment.