├── .gitignore ├── .scrutinizer.yml ├── .travis.yml ├── CHANGELOG.md ├── DependencyInjection ├── Compiler │ └── RegisterFormExtensionPass.php └── PimEnhancedConnectorExtension.php ├── Job └── JobParameters │ ├── ConstraintCollectionProvider │ └── FamilyCsvExport.php │ └── DefaultValuesProvider │ └── FamilyCsvExport.php ├── PimEnhancedConnectorBundle.php ├── Processor └── Normalization │ ├── AttributeProcessor.php │ └── FamilyProcessor.php ├── README.md ├── Resources ├── config │ ├── form_extensions │ │ ├── pimgento_csv_family_export_edit.yml │ │ └── pimgento_csv_family_export_show.yml │ ├── form_extensions_ee │ │ └── pimgento_csv_family_export_permissions.yml │ ├── jobs.yml │ ├── processors.yml │ ├── requirejs.yml │ └── steps.yml ├── public │ └── js │ │ └── activated-locales-list.js └── translations │ ├── jsmessages.en.yml │ ├── jsmessages.fr.yml │ ├── messages.en.yml │ └── messages.fr.yml ├── UPGRADE-1.3.md ├── composer.json ├── phpspec-scrutinizer.yml └── spec └── Pim └── Bundle └── EnhancedConnectorBundle └── Processor └── Normalization ├── AttributeProcessorSpec.php └── FamilyProcessorSpec.php /.gitignore: -------------------------------------------------------------------------------- 1 | # Cache and logs (Symfony2) 2 | /app/cache/* 3 | /app/logs/* 4 | !app/cache/.gitkeep 5 | !app/logs/.gitkeep 6 | 7 | # Cache and logs (Symfony3) 8 | /var/cache/* 9 | /var/logs/* 10 | !var/cache/.gitkeep 11 | !var/logs/.gitkeep 12 | 13 | # Parameters 14 | /app/config/parameters.yml 15 | /app/config/parameters.ini 16 | 17 | # Managed by Composer 18 | /app/bootstrap.php.cache 19 | /var/bootstrap.php.cache 20 | /bin/* 21 | !bin/console 22 | !bin/symfony_requirements 23 | /vendor/ 24 | 25 | # Assets and user uploads 26 | /web/bundles/ 27 | /web/uploads/ 28 | 29 | # PHPUnit 30 | /app/phpunit.xml 31 | /phpunit.xml 32 | 33 | # Build data 34 | /build/ 35 | 36 | # Composer 37 | /composer.phar 38 | /composer.lock 39 | -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | filter: 2 | paths: 3 | - ./* 4 | 5 | build: 6 | environment: 7 | php: 8 | version: '5.6' 9 | ini: 10 | 'memory_limit': '3G' 11 | tests: 12 | override: 13 | - 14 | command: 'bin/phpspec run -f progress -c phpspec-scrutinizer.yml' 15 | coverage: 16 | file: 'coverage.clover' 17 | format: 'php-clover' 18 | 19 | tools: 20 | php_analyzer: false 21 | php_mess_detector: 22 | filter: 23 | excluded_paths: 24 | - bin/* 25 | - spec/* 26 | - vendor/* 27 | php_code_sniffer: 28 | config: 29 | standard: PSR2 30 | filter: 31 | excluded_paths: 32 | - bin/* 33 | - spec/* 34 | - vendor/* 35 | sensiolabs_security_checker: true 36 | php_cpd: 37 | filter: 38 | excluded_paths: 39 | - bin/* 40 | - spec/* 41 | - vendor/* 42 | php_loc: 43 | excluded_dirs: 44 | - app/ 45 | - bin/ 46 | - vendor/ 47 | - web/ 48 | php_pdepend: 49 | excluded_dirs: 50 | - app/ 51 | - bin/ 52 | - vendor/ 53 | - web/ 54 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | sudo: false 3 | 4 | php: 5 | - 5.6 6 | 7 | cache: 8 | directories: 9 | - $HOME/.composer/cache/files 10 | 11 | before_install: 12 | - echo "memory_limit=3G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini 13 | - phpenv config-rm xdebug.ini || echo "xdebug not available for PHP $TRAVIS_PHP_VERSION" 14 | - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config 15 | 16 | install: 17 | - composer install --no-interaction --no-scripts --prefer-dist 18 | 19 | script: 20 | - ./bin/phpspec run 21 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 1.4.3 2 | ## Bug fixes 3 | - ECB-14: Fix permissions on job profiles 4 | 5 | # 1.4.1 (2017-05-31) 6 | ## Bug fixes 7 | - GITHUB-90: family export doesnt export label 8 | 9 | # 1.2.3 (2017-04-11) 10 | ## Bug fixes 11 | - ECB-13: fix ProductReader returning false 12 | 13 | # 1.4.0 (2017-03-14) 14 | ## Improvements 15 | - Compatibility with PIM 1.7 community edition 1.7 16 | - Compatibility with PIM 1.7 enterprise edition 1.7 17 | - Remove all FormConfigurationProviders to use the new PEF for Jobs 18 | 19 | # 1.3.0 (2016-08-05) 20 | ## Improvements 21 | - Compatibility with PIM community edition 1.6 22 | - Compatibility with PIM enterprise edition 1.6 23 | - Remove the customized product export as the PIM 1.6 supports same filtering features (completeness, last export date) 24 | - Move `Pim\Bundle\EnhancedConnectorBundle\Processor\AttributeToFlatArrayProcessor` to `Pim\Bundle\EnhancedConnectorBundle\Processor\Normalization\AttributeProcessor` 25 | - Move `Pim\Bundle\EnhancedConnectorBundle\Processor\FamilyToFlatArrayProcessor` to `Pim\Bundle\EnhancedConnectorBundle\Processor\Normalization\FamilyProcessor` 26 | 27 | # 1.2.2 - (2016-08-04) 28 | ## Improvements 29 | - Use startTime instead of endTime for last execution date 30 | 31 | # 1.2.1 - (2016-06-09) 32 | ## Improvements 33 | - Use of object detacher in ProductReader is deprecated and will be removed in 1.3 34 | 35 | # 1.2.0 - (2016-03-08) 36 | ## New feature 37 | - Compatibility with Akeneo PIM 1.5 38 | 39 | ## Improvements 40 | - Detach products after having read them instead of doing it in the processor 41 | 42 | ## BC Break 43 | - Remove enhanced family export as it has been integrated in Akeneo PIM 1.5 44 | - Replace service `pim_enhanced_connector.reader.orm.family` by `pim_base_connector.reader.orm.family` 45 | - Replace service `pim_enhanced_connector.processor.product_to_flat_array` by `pim_base_connector.processor.product_to_flat_array` 46 | - Added `akeneo_storage_utils.doctrine.object_detacher` in `pim_enhanced_connector.reader.product` 47 | 48 | # 1.1 - (2016-01-28) 49 | ## Bug fixes 50 | - ECB-7: diverted from 1.3 branch where a BC break was fixed 51 | 52 | # 1.0.5 (2016-01-11) 53 | ## Bug fixes 54 | - ECB-6: Detach products once processed to avoid memory leak 55 | 56 | # 1.0.4 (2016-01-07) 57 | ## New feature 58 | - ECB-5: Add a new option to export categorized and/or uncategorized products 59 | 60 | # 1.0.3 (2015-10-28) 61 | ## Bug fixes 62 | - ECB-3: Attribute labels are tranlated and exported to PimGento only for active locales 63 | - ECB-4: Add missing translations on enhanced product export display 64 | 65 | # 1.0.2 (2015-10-12) 66 | ## Bug fixes 67 | - Correct a bug that prevents family export to PimGento if no label is filled 68 | - Correct a bug that prevents attribute export to PimGento if the attribute is in no family 69 | 70 | # 1.0.1 (2015-08-27) 71 | ## Bug fixes 72 | - Using datagrids update filter results in an error caused by the "Greater or equal" operator used by the enhanced product reader 73 | 74 | # 1.0 (2015-06-10) 75 | - Initial release 76 | -------------------------------------------------------------------------------- /DependencyInjection/Compiler/RegisterFormExtensionPass.php: -------------------------------------------------------------------------------- 1 | 14 | * @copyright 2017 Akeneo SAS (http://www.akeneo.com) 15 | */ 16 | class RegisterFormExtensionPass implements CompilerPassInterface 17 | { 18 | /** @staticvar string */ 19 | const PROVIDER_ID = 'pim_enrich.provider.form_extension'; 20 | 21 | /** 22 | * {@inheritdoc} 23 | * 24 | * @see \Pim\Bundle\EnrichBundle\DependencyInjection\Compiler\RegisterFormExtensionsPass 25 | */ 26 | public function process(ContainerBuilder $container) 27 | { 28 | if (!$container->hasDefinition(static::PROVIDER_ID)) { 29 | return; 30 | } 31 | $providerDefinition = $container->getDefinition(static::PROVIDER_ID); 32 | 33 | $extensionConfig = []; 34 | $attributeFields = []; 35 | $filepaths = [ 36 | __DIR__ .'/../../Resources/config/form_extensions_ee/pimgento_csv_family_export_permissions.yml', 37 | ]; 38 | 39 | foreach ($filepaths as $filepath) { 40 | $config = Yaml::parse(file_get_contents($filepath)); 41 | if (isset($config['extensions']) && is_array($config['extensions'])) { 42 | $extensionConfig = array_replace_recursive($extensionConfig, $config['extensions']); 43 | } 44 | if (isset($config['attribute_fields']) && is_array($config['attribute_fields'])) { 45 | $attributeFields = array_merge($attributeFields, $config['attribute_fields']); 46 | } 47 | 48 | $container->addResource(new FileResource($filepath)); 49 | 50 | foreach ($extensionConfig as $code => $extension) { 51 | $providerDefinition->addMethodCall('addExtension', [$code, $extension]); 52 | } 53 | 54 | foreach ($attributeFields as $attributeType => $module) { 55 | $providerDefinition->addMethodCall('addAttributeField', [$attributeType, $module]); 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /DependencyInjection/PimEnhancedConnectorExtension.php: -------------------------------------------------------------------------------- 1 | 14 | * @copyright 2015 Akeneo SAS (http://www.akeneo.com) 15 | * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 16 | */ 17 | class PimEnhancedConnectorExtension extends Extension 18 | { 19 | /** 20 | * {@inheritdoc} 21 | */ 22 | public function load(array $configs, ContainerBuilder $container) 23 | { 24 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); 25 | $loader->load('jobs.yml'); 26 | $loader->load('processors.yml'); 27 | $loader->load('steps.yml'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Job/JobParameters/ConstraintCollectionProvider/FamilyCsvExport.php: -------------------------------------------------------------------------------- 1 | 14 | * @copyright 2016 Akeneo SAS (http://www.akeneo.com) 15 | * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 16 | */ 17 | class FamilyCsvExport implements ConstraintCollectionProviderInterface 18 | { 19 | /** @var ConstraintCollectionProviderInterface */ 20 | protected $simpleProvider; 21 | 22 | /** @var array */ 23 | protected $supportedJobNames; 24 | 25 | /** 26 | * @param ConstraintCollectionProviderInterface $simpleCsv 27 | * @param array $supportedJobNames 28 | */ 29 | public function __construct(ConstraintCollectionProviderInterface $simpleCsv, array $supportedJobNames) 30 | { 31 | $this->simpleProvider = $simpleCsv; 32 | $this->supportedJobNames = $supportedJobNames; 33 | } 34 | 35 | /** 36 | * {@inheritdoc} 37 | */ 38 | public function getConstraintCollection() 39 | { 40 | $baseConstraint = $this->simpleProvider->getConstraintCollection(); 41 | $constraintFields = $baseConstraint->fields; 42 | $constraintFields['labelLocale'] = new NotBlank(); 43 | 44 | return new Collection(['fields' => $constraintFields]); 45 | } 46 | 47 | /** 48 | * {@inheritdoc} 49 | */ 50 | public function supports(JobInterface $job) 51 | { 52 | return in_array($job->getName(), $this->supportedJobNames); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /Job/JobParameters/DefaultValuesProvider/FamilyCsvExport.php: -------------------------------------------------------------------------------- 1 | 12 | * @copyright 2016 Akeneo SAS (http://www.akeneo.com) 13 | * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 14 | */ 15 | class FamilyCsvExport implements DefaultValuesProviderInterface 16 | { 17 | /** @var DefaultValuesProviderInterface */ 18 | protected $simpleProvider; 19 | 20 | /** @var array */ 21 | protected $supportedJobNames; 22 | 23 | /** 24 | * @param DefaultValuesProviderInterface $simpleProvider 25 | * @param array $supportedJobNames 26 | */ 27 | public function __construct(DefaultValuesProviderInterface $simpleProvider, array $supportedJobNames) 28 | { 29 | $this->simpleProvider = $simpleProvider; 30 | $this->supportedJobNames = $supportedJobNames; 31 | } 32 | 33 | /** 34 | * {@inheritdoc} 35 | */ 36 | public function getDefaultValues() 37 | { 38 | $parameters = $this->simpleProvider->getDefaultValues(); 39 | $parameters['filePath'] = '/tmp/csv_family_pimgento.csv'; 40 | $parameters['labelLocale'] = null; 41 | 42 | return $parameters; 43 | } 44 | 45 | /** 46 | * {@inheritdoc} 47 | */ 48 | public function supports(JobInterface $job) 49 | { 50 | return in_array($job->getName(), $this->supportedJobNames); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /PimEnhancedConnectorBundle.php: -------------------------------------------------------------------------------- 1 | 13 | * @copyright 2015 Akeneo SAS (http://www.akeneo.com) 14 | * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 15 | */ 16 | class PimEnhancedConnectorBundle extends Bundle 17 | { 18 | public function build(ContainerBuilder $container) 19 | { 20 | if (class_exists('PimEnterprise\Bundle\WorkflowBundle\PimEnterpriseWorkflowBundle')) { 21 | $container->addCompilerPass(new RegisterFormExtensionPass()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Processor/Normalization/AttributeProcessor.php: -------------------------------------------------------------------------------- 1 | 12 | * @copyright 2015 Akeneo SAS (http://www.akeneo.com) 13 | * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 14 | */ 15 | class AttributeProcessor implements ItemProcessorInterface 16 | { 17 | /** @const string */ 18 | const ITEM_SEPARATOR = ','; 19 | 20 | /** @var ItemProcessorInterface */ 21 | protected $baseProcessor; 22 | 23 | /** 24 | * @param ItemProcessorInterface $baseProcessor 25 | */ 26 | public function __construct(ItemProcessorInterface $baseProcessor) 27 | { 28 | $this->baseProcessor = $baseProcessor; 29 | } 30 | 31 | /** 32 | * {@inheritdoc} 33 | */ 34 | public function process($attribute) 35 | { 36 | $normalizedAttribute = $this->baseProcessor->process($attribute); 37 | $normalizedAttribute['families'] = $this->getAttributeFamilyCodes($attribute); 38 | 39 | return $normalizedAttribute; 40 | } 41 | 42 | /** 43 | * Returns the list of all the family codes of the attribute. 44 | * 45 | * @param AttributeInterface $attribute 46 | * 47 | * @return string 48 | */ 49 | protected function getAttributeFamilyCodes(AttributeInterface $attribute) 50 | { 51 | $families = $attribute->getFamilies(); 52 | 53 | $familyCodes = []; 54 | if (null !== $families) { 55 | foreach ($families as $family) { 56 | $familyCodes[] = $family->getCode(); 57 | } 58 | } 59 | 60 | return implode(self::ITEM_SEPARATOR, $familyCodes); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Processor/Normalization/FamilyProcessor.php: -------------------------------------------------------------------------------- 1 | 14 | * @copyright 2015 Akeneo SAS (http://www.akeneo.com) 15 | * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 16 | */ 17 | class FamilyProcessor implements ItemProcessorInterface, StepExecutionAwareInterface 18 | { 19 | /** @var NormalizerInterface */ 20 | protected $transNormalizer; 21 | 22 | /** @var StepExecution */ 23 | protected $stepExecution; 24 | 25 | /** 26 | * @param NormalizerInterface $transNormalizer 27 | */ 28 | public function __construct(NormalizerInterface $transNormalizer) 29 | { 30 | $this->transNormalizer = $transNormalizer; 31 | } 32 | 33 | /** 34 | * {@inheritdoc} 35 | */ 36 | public function process($family) 37 | { 38 | $parameters = $this->stepExecution->getJobParameters(); 39 | $labelLocale = $parameters->get('labelLocale'); 40 | 41 | $flatFamily = ['code' => $family->getCode()]; 42 | 43 | $familyLabels = $this->transNormalizer->normalize($family); 44 | if (!empty($familyLabels)) { 45 | $flatFamily['label'] = $familyLabels[$labelLocale]; 46 | } else { 47 | $flatFamily['label'] = sprintf('[%s]', $family->getCode()); 48 | } 49 | 50 | return $flatFamily; 51 | } 52 | 53 | /** 54 | * {@inheritdoc} 55 | */ 56 | public function setStepExecution(StepExecution $stepExecution) 57 | { 58 | $this->stepExecution = $stepExecution; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EnhancedConnectorBundle 2 | 3 | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/akeneo-labs/EnhancedConnectorBundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/akeneo-labs/EnhancedConnectorBundle/?branch=master) 4 | [![Build Status](https://travis-ci.org/akeneo-labs/EnhancedConnectorBundle.svg?branch=master)](https://travis-ci.org/akeneo-labs/EnhancedConnectorBundle) 5 | 6 | This bundle adds some new exports to Akeneo: 7 | 8 | - Family export in CSV format for PimGento (only codes and labels). 9 | 10 | - Attribute export in CSV format for PimGento with corresponding family code. 11 | 12 | This bundle can be use as a replacement for the [DnD-MagentoConnectorBundle](https://github.com/Agence-DnD/DnD-MagentoConnectorBundle), to work with [PimGento](https://github.com/Agence-DnD/PIMGento). 13 | However, it does not provide a SSH export as the DnD Magento connector bundle does. If you need to automatically send your exports to PimGento, you should set up a CRON task and include the SSH export in it. 14 | 15 | 16 | ## Requirements 17 | 18 | | EnhancedConnectorBundle | Akeneo PIM Community Edition | 19 | |:-----------------------:|:----------------------------:| 20 | | v1.4.* | v1.7.* | 21 | | v1.3.* | v1.6.* | 22 | | v1.2.* | v1.5.* | 23 | | v1.1.* | v1.4.* | 24 | | v1.0.* | v1.3.* | 25 | 26 | 27 | ## Installation 28 | 29 | Install the bundle with composer: 30 | 31 | ```bash 32 | php composer.phar require akeneo-labs/pim-enhanced-connector:~1.4 33 | ``` 34 | 35 | Enable the bundle in the `app/AppKernel.php` file: 36 | 37 | ```php 38 | public function registerProjectBundles() 39 | { 40 | return [ 41 | new Pim\Bundle\EnhancedConnectorBundle\PimEnhancedConnectorBundle(), 42 | 43 | // ... 44 | 45 | ]; 46 | } 47 | ``` 48 | 49 | Now let's clean your cache and dump your assets: 50 | 51 | ```bash 52 | php app/console cache:clear --env=prod 53 | php app/console pim:installer:assets --env=prod 54 | ``` 55 | 56 | 57 | ## Documentation 58 | 59 | ### Configuration 60 | 61 | This section explains how to export your data from Akeneo PIM. If you want to know how to use them once exported, take a look at the [PimGento documentation](https://github.com/Agence-DnD/PIMGento#configuration-and-usage). 62 | 63 | Go to ```Spread > Export``` and create the export you need (note that you can export your data in whatever order you want, only PimGento requires that you import data in a precise order, the same that is used below): 64 | 65 | 1. Category export: use the standard Akeneo CSV export for category exports. 66 | 67 | 2. Family export: use the "Export families to CSV for PimGento" job from the Enhanced connector bundle. 68 | 69 | 3. Attribute export: use the "Export attributes to CSV for PimGento" job from the Enhanced connector bundle. 70 | 71 | 4. Attribute option export: use the standard Akeneo CSV export for attribute options. 72 | 73 | 5. Product export: use the standard "Export products" that you can configure through the Export Builder. 74 | 75 | All these exports are configured like standards CSV Akeneo exports: you need to define a delimitor (the character separating the elements on a same line), an enclosure (for instance, if a label contain spaces, it needs to be enclose to avoid import errors), if you want headers in your file, and the file path to save your export. 76 | 77 | However, the family and the product exports adds a few new configuration fields, as explained below. 78 | 79 | ### Family export 80 | 81 | You need to choose which in which language you want to export the family label, as PimGento needs only one label (ideally, the language should correspond to the Magento locale for the administration interface). 82 | 83 | -------------------------------------------------------------------------------- /Resources/config/form_extensions/pimgento_csv_family_export_edit.yml: -------------------------------------------------------------------------------- 1 | extensions: 2 | pimgento-csv-family-export-edit: 3 | module: pim/form/common/edit-form 4 | 5 | pimgento-csv-family-export-edit-cache-invalidator: 6 | module: pim/cache-invalidator 7 | parent: pimgento-csv-family-export-edit 8 | position: 1000 9 | 10 | pimgento-csv-family-export-edit-tabs: 11 | module: pim/form/common/form-tabs 12 | parent: pimgento-csv-family-export-edit 13 | targetZone: content 14 | position: 100 15 | 16 | pimgento-csv-family-export-edit-properties: 17 | module: pim/job/common/edit/properties 18 | parent: pimgento-csv-family-export-edit-tabs 19 | aclResourceId: pim_importexport_export_profile_property_edit 20 | targetZone: container 21 | position: 100 22 | config: 23 | tabTitle: pim_enrich.form.job_instance.tab.properties.title 24 | tabCode: pim-job-instance-properties 25 | 26 | pimgento-csv-family-export-edit-history: 27 | module: pim/common/tab/history 28 | parent: pimgento-csv-family-export-edit-tabs 29 | targetZone: container 30 | aclResourceId: pim_importexport_export_profile_history 31 | position: 120 32 | config: 33 | class: Akeneo\Component\Batch\Model\JobInstance 34 | title: pim_enrich.form.job_instance.tab.history.title 35 | tabCode: pim-job-instance-history 36 | 37 | pimgento-csv-family-export-edit-properties-code: 38 | module: pim/job/common/edit/field/text 39 | parent: pimgento-csv-family-export-edit-properties 40 | position: 100 41 | targetZone: properties 42 | config: 43 | fieldCode: code 44 | label: pim_enrich.form.job_instance.tab.properties.code.title 45 | readOnly: true 46 | 47 | pimgento-csv-family-export-edit-properties-label: 48 | module: pim/job/common/edit/field/text 49 | parent: pimgento-csv-family-export-edit-properties 50 | position: 110 51 | targetZone: properties 52 | config: 53 | fieldCode: label 54 | label: pim_enrich.form.job_instance.tab.properties.label.title 55 | readOnly: false 56 | 57 | pimgento-csv-family-export-edit-properties-file-path: 58 | module: pim/job/common/edit/field/text 59 | parent: pimgento-csv-family-export-edit-properties 60 | position: 120 61 | targetZone: global-settings 62 | config: 63 | fieldCode: configuration.filePath 64 | readOnly: false 65 | label: pim_enrich.form.job_instance.tab.properties.file_path.title 66 | tooltip: pim_enrich.form.job_instance.tab.properties.file_path.help 67 | 68 | pimgento-csv-family-export-edit-properties-delimiter: 69 | module: pim/job/common/edit/field/text 70 | parent: pimgento-csv-family-export-edit-properties 71 | position: 130 72 | targetZone: global-settings 73 | config: 74 | fieldCode: configuration.delimiter 75 | readOnly: false 76 | label: pim_enrich.form.job_instance.tab.properties.delimiter.title 77 | tooltip: pim_enrich.form.job_instance.tab.properties.delimiter.help 78 | 79 | pimgento-csv-family-export-edit-properties-enclosure: 80 | module: pim/job/common/edit/field/text 81 | parent: pimgento-csv-family-export-edit-properties 82 | position: 140 83 | targetZone: global-settings 84 | config: 85 | fieldCode: configuration.enclosure 86 | readOnly: false 87 | label: pim_enrich.form.job_instance.tab.properties.enclosure.title 88 | tooltip: pim_enrich.form.job_instance.tab.properties.enclosure.help 89 | 90 | pimgento-csv-family-export-edit-properties-with-header: 91 | module: pim/job/common/edit/field/switch 92 | parent: pimgento-csv-family-export-edit-properties 93 | position: 150 94 | targetZone: global-settings 95 | config: 96 | fieldCode: configuration.withHeader 97 | readOnly: false 98 | label: pim_enrich.form.job_instance.tab.properties.with_header.title 99 | tooltip: pim_enrich.form.job_instance.tab.properties.with_header.help 100 | 101 | pimgento-csv-family-export-edit-properties-activated-locales-list: 102 | module: activated-locales-list 103 | parent: pimgento-csv-family-export-edit-properties 104 | position: 155 105 | targetZone: global-settings 106 | config: 107 | fieldCode: configuration.labelLocale 108 | readOnly: false 109 | label: pim_enhanced_connector.family_processor.locale.label 110 | tooltip: pim_enhanced_connector.family_processor.locale.help 111 | 112 | pimgento-csv-family-export-edit-label: 113 | module: pim/job/common/edit/label 114 | parent: pimgento-csv-family-export-edit 115 | targetZone: title 116 | position: 100 117 | 118 | pimgento-csv-family-export-edit-meta: 119 | module: pim/job/common/edit/meta 120 | parent: pimgento-csv-family-export-edit 121 | targetZone: meta 122 | position: 100 123 | 124 | pimgento-csv-family-export-edit-back-to-grid: 125 | module: pim/form/common/back-to-grid 126 | parent: pimgento-csv-family-export-edit 127 | targetZone: back 128 | aclResourceId: pim_importexport_export_profile_index 129 | position: 80 130 | config: 131 | backUrl: pim_importexport_export_profile_index 132 | 133 | pimgento-csv-family-export-edit-delete: 134 | module: pim/job/export/edit/delete 135 | parent: pimgento-csv-family-export-edit 136 | targetZone: buttons 137 | aclResourceId: pim_importexport_export_profile_remove 138 | position: 100 139 | config: 140 | trans: 141 | title: confirmation.remove.job_instance 142 | content: pim_enrich.confirmation.delete_item 143 | success: flash.job_instance.removed 144 | failed: error.removing.job_instance 145 | redirect: pim_importexport_export_profile_index 146 | 147 | pimgento-csv-family-export-edit-save-buttons: 148 | module: pim/form/common/save-buttons 149 | parent: pimgento-csv-family-export-edit 150 | targetZone: buttons 151 | position: 120 152 | 153 | pimgento-csv-family-export-edit-save: 154 | module: pim/job-instance-export-edit-form/save 155 | parent: pimgento-csv-family-export-edit 156 | targetZone: buttons 157 | position: 0 158 | config: 159 | redirectPath: pim_importexport_export_profile_show 160 | 161 | pimgento-csv-family-export-edit-state: 162 | module: pim/form/common/state 163 | parent: pimgento-csv-family-export-edit 164 | targetZone: state 165 | position: 900 166 | config: 167 | entity: pim_enrich.entity.job_instance.title 168 | 169 | pimgento-csv-family-export-edit-validation: 170 | module: pim/job/common/edit/validation 171 | parent: pimgento-csv-family-export-edit 172 | -------------------------------------------------------------------------------- /Resources/config/form_extensions/pimgento_csv_family_export_show.yml: -------------------------------------------------------------------------------- 1 | extensions: 2 | pimgento-csv-family-export-show: 3 | module: pim/form/common/edit-form 4 | 5 | pimgento-csv-family-export-show-tabs: 6 | module: pim/form/common/form-tabs 7 | parent: pimgento-csv-family-export-show 8 | targetZone: content 9 | position: 100 10 | 11 | pimgento-csv-family-export-show-properties: 12 | module: pim/job/common/edit/properties 13 | parent: pimgento-csv-family-export-show-tabs 14 | aclResourceId: pim_importexport_export_profile_property_edit 15 | targetZone: container 16 | position: 100 17 | config: 18 | tabTitle: pim_enrich.form.job_instance.tab.properties.title 19 | tabCode: pim-job-instance-properties 20 | 21 | pimgento-csv-family-export-show-history: 22 | module: pim/common/tab/history 23 | parent: pimgento-csv-family-export-show-tabs 24 | targetZone: container 25 | aclResourceId: pim_importexport_export_profile_history 26 | position: 120 27 | config: 28 | class: Akeneo\Component\Batch\Model\JobInstance 29 | title: pim_enrich.form.job_instance.tab.history.title 30 | tabCode: pim-job-instance-history 31 | 32 | pimgento-csv-family-export-show-properties-code: 33 | module: pim/job/common/edit/field/text 34 | parent: pimgento-csv-family-export-show-properties 35 | position: 100 36 | targetZone: properties 37 | config: 38 | fieldCode: code 39 | label: pim_enrich.form.job_instance.tab.properties.code.title 40 | readOnly: true 41 | 42 | pimgento-csv-family-export-show-properties-label: 43 | module: pim/job/common/edit/field/text 44 | parent: pimgento-csv-family-export-show-properties 45 | position: 110 46 | targetZone: properties 47 | config: 48 | fieldCode: label 49 | label: pim_enrich.form.job_instance.tab.properties.label.title 50 | readOnly: true 51 | 52 | pimgento-csv-family-export-show-properties-file-path: 53 | module: pim/job/common/edit/field/text 54 | parent: pimgento-csv-family-export-show-properties 55 | position: 120 56 | targetZone: global-settings 57 | config: 58 | fieldCode: configuration.filePath 59 | readOnly: true 60 | label: pim_enrich.form.job_instance.tab.properties.file_path.title 61 | tooltip: pim_enrich.form.job_instance.tab.properties.file_path.help 62 | 63 | pimgento-csv-family-export-show-properties-delimiter: 64 | module: pim/job/common/edit/field/text 65 | parent: pimgento-csv-family-export-show-properties 66 | position: 130 67 | targetZone: global-settings 68 | config: 69 | fieldCode: configuration.delimiter 70 | readOnly: true 71 | label: pim_enrich.form.job_instance.tab.properties.delimiter.title 72 | tooltip: pim_enrich.form.job_instance.tab.properties.delimiter.help 73 | 74 | pimgento-csv-family-export-show-properties-enclosure: 75 | module: pim/job/common/edit/field/text 76 | parent: pimgento-csv-family-export-show-properties 77 | position: 140 78 | targetZone: global-settings 79 | config: 80 | fieldCode: configuration.enclosure 81 | readOnly: true 82 | label: pim_enrich.form.job_instance.tab.properties.enclosure.title 83 | tooltip: pim_enrich.form.job_instance.tab.properties.enclosure.help 84 | 85 | pimgento-csv-family-export-show-properties-with-header: 86 | module: pim/job/common/edit/field/switch 87 | parent: pimgento-csv-family-export-show-properties 88 | position: 150 89 | targetZone: global-settings 90 | config: 91 | fieldCode: configuration.withHeader 92 | readOnly: true 93 | label: pim_enrich.form.job_instance.tab.properties.with_header.title 94 | tooltip: pim_enrich.form.job_instance.tab.properties.with_header.help 95 | 96 | pimgento-csv-family-export-show-properties-activated-locales-list: 97 | module: activated-locales-list 98 | parent: pimgento-csv-family-export-show-properties 99 | position: 155 100 | targetZone: global-settings 101 | config: 102 | fieldCode: configuration.labelLocale 103 | readOnly: true 104 | label: pim_enhanced_connector.family_processor.locale.label 105 | tooltip: pim_enhanced_connector.family_processor.locale.help 106 | 107 | pimgento-csv-family-export-show-label: 108 | module: pim/job/common/edit/label 109 | parent: pimgento-csv-family-export-show 110 | targetZone: title 111 | position: 100 112 | 113 | pimgento-csv-family-export-show-meta: 114 | module: pim/job/common/edit/meta 115 | parent: pimgento-csv-family-export-show 116 | targetZone: meta 117 | position: 100 118 | 119 | pimgento-csv-family-export-show-back-to-grid: 120 | module: pim/form/common/back-to-grid 121 | parent: pimgento-csv-family-export-show 122 | targetZone: back 123 | aclResourceId: pim_importexport_export_profile_index 124 | position: 80 125 | config: 126 | backUrl: pim_importexport_export_profile_index 127 | 128 | pimgento-csv-family-export-show-edit: 129 | module: pim/common/redirect 130 | parent: pimgento-csv-family-export-show 131 | targetZone: buttons 132 | position: 100 133 | config: 134 | label: pim_enrich.form.job_instance.button.edit.title 135 | route: pim_importexport_export_profile_edit 136 | identifier: 137 | path: code 138 | name: code 139 | 140 | pimgento-csv-family-export-show-launch: 141 | module: pim/job/common/edit/launch 142 | parent: pimgento-csv-family-export-show 143 | targetZone: buttons 144 | position: 110 145 | config: 146 | label: pim_enrich.form.job_instance.button.export.title 147 | route: pim_enrich_job_instance_rest_export_launch 148 | identifier: 149 | path: code 150 | name: code 151 | -------------------------------------------------------------------------------- /Resources/config/form_extensions_ee/pimgento_csv_family_export_permissions.yml: -------------------------------------------------------------------------------- 1 | extensions: 2 | pimgento-csv-family-export-edit-permission: 3 | module: pimee/common/tab/permission 4 | parent: pimgento-csv-family-export-edit-tabs 5 | targetZone: container 6 | aclResourceId: pimee_importexport_export_profile_edit_permissions 7 | position: 115 8 | config: 9 | title: pimee_enrich.form.job_instance.tab.permission.title 10 | tabCode: pim-job-instance-permission 11 | 12 | pimgento-csv-family-export-show-permission: 13 | module: pimee/common/tab/permission 14 | parent: pimgento-csv-family-export-show-tabs 15 | targetZone: container 16 | position: 115 17 | aclResourceId: pimee_importexport_export_profile_show_permissions 18 | config: 19 | title: pimee_enrich.form.job_instance.tab.permission.title 20 | tabCode: pim-job-instance-permission 21 | readOnly: true 22 | -------------------------------------------------------------------------------- /Resources/config/jobs.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | pim_enhanced_connector.connector_name: 'Enhanced Connector' 3 | pim_enhanced_connector.job_name.csv_attribute_export: 'pimgento_csv_attribute_export' 4 | pim_enhanced_connector.job_name.csv_family_export: 'pimgento_csv_family_export' 5 | pim_enhanced_connector.job.job_parameters.default_values_provider.family_csv_export.class: Pim\Bundle\EnhancedConnectorBundle\Job\JobParameters\DefaultValuesProvider\FamilyCsvExport 6 | pim_enhanced_connector.job.job_parameters.constraint_collection_provider.family_csv_export.class: Pim\Bundle\EnhancedConnectorBundle\Job\JobParameters\ConstraintCollectionProvider\FamilyCsvExport 7 | 8 | services: 9 | # Job Definition -------------------------------------------------------------------------------------------------- 10 | pim_enhanced_connector.job.csv_attribute_export: 11 | class: '%pim_connector.job.simple_job.class%' 12 | arguments: 13 | - '%pim_enhanced_connector.job_name.csv_attribute_export%' 14 | - '@event_dispatcher' 15 | - '@akeneo_batch.job_repository' 16 | - 17 | - '@pim_enhanced_connector.step.csv_attribute.export' 18 | tags: 19 | - { name: akeneo_batch.job, connector: '%pim_enhanced_connector.connector_name%', type: '%pim_connector.job.export_type%' } 20 | 21 | pim_enhanced_connector.job.csv_family_export: 22 | class: '%pim_connector.job.simple_job.class%' 23 | arguments: 24 | - '%pim_enhanced_connector.job_name.csv_family_export%' 25 | - '@event_dispatcher' 26 | - '@akeneo_batch.job_repository' 27 | - 28 | - '@pim_enhanced_connector.step.csv_family.export' 29 | tags: 30 | - { name: akeneo_batch.job, connector: '%pim_enhanced_connector.connector_name%', type: '%pim_connector.job.export_type%' } 31 | 32 | # Job Parameters -------------------------------------------------------------------------------------------------- 33 | pim_enhanced_connector.job.job_parameters.default_values_provider.enhanced_csv_export: 34 | class: '%pim_connector.job.job_parameters.default_values_provider.simple_csv_export.class%' 35 | arguments: 36 | - 37 | - '%pim_enhanced_connector.job_name.csv_attribute_export%' 38 | tags: 39 | - { name: akeneo_batch.job.job_parameters.default_values_provider } 40 | 41 | pim_enhanced_connector.job.job_parameters.constraint_collection_provider.enhanced_csv_export: 42 | class: '%pim_connector.job.job_parameters.constraint_collection_provider.simple_csv_export.class%' 43 | arguments: 44 | - 45 | - '%pim_enhanced_connector.job_name.csv_attribute_export%' 46 | tags: 47 | - { name: akeneo_batch.job.job_parameters.constraint_collection_provider } 48 | 49 | pim_enhanced_connector.job.job_instance.enhanced_csv_export: 50 | class: '%pim_enrich.provider.form.job_instance.class%' 51 | arguments: 52 | - 53 | pimgento_csv_attribute_export: pim-job-instance-csv-base-export 54 | tags: 55 | - { name: pim_enrich.provider.form, priority: 90 } 56 | 57 | pim_enhanced_connector.job.job_parameters.default_values_provider.family_csv_export: 58 | class: '%pim_enhanced_connector.job.job_parameters.default_values_provider.family_csv_export.class%' 59 | arguments: 60 | - '@pim_connector.job.job_parameters.default_values_provider.simple_csv_export' 61 | - 62 | - '%pim_enhanced_connector.job_name.csv_family_export%' 63 | tags: 64 | - { name: akeneo_batch.job.job_parameters.default_values_provider } 65 | 66 | pim_enhanced_connector.job.job_parameters.constraint_collection_provider.family_csv_export: 67 | class: '%pim_enhanced_connector.job.job_parameters.constraint_collection_provider.family_csv_export.class%' 68 | arguments: 69 | - '@pim_connector.job.job_parameters.constraint_collection_provider.simple_csv_export' 70 | - 71 | - '%pim_enhanced_connector.job_name.csv_family_export%' 72 | tags: 73 | - { name: akeneo_batch.job.job_parameters.constraint_collection_provider } 74 | 75 | pim_enhanced_connector.job.job_instance.family_csv_export: 76 | class: '%pim_enrich.provider.form.job_instance.class%' 77 | arguments: 78 | - 79 | pimgento_csv_family_export: pimgento-csv-family-export 80 | tags: 81 | - { name: pim_enrich.provider.form, priority: 90 } 82 | -------------------------------------------------------------------------------- /Resources/config/processors.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | pim_enhanced_connector.processor.normalization.family.class: Pim\Bundle\EnhancedConnectorBundle\Processor\Normalization\FamilyProcessor 3 | pim_enhanced_connector.processor.normalization.attribute.class: Pim\Bundle\EnhancedConnectorBundle\Processor\Normalization\AttributeProcessor 4 | 5 | services: 6 | pim_enhanced_connector.processor.normalization.family: 7 | class: '%pim_enhanced_connector.processor.normalization.family.class%' 8 | arguments: 9 | - '@pim_catalog.normalizer.standard.translation' 10 | 11 | pim_enhanced_connector.processor.normalization.attribute: 12 | class: '%pim_enhanced_connector.processor.normalization.attribute.class%' 13 | arguments: 14 | - '@pim_connector.processor.normalization.attribute' 15 | -------------------------------------------------------------------------------- /Resources/config/requirejs.yml: -------------------------------------------------------------------------------- 1 | config: 2 | paths: 3 | activated-locales-list: pimenhancedconnector/js/activated-locales-list 4 | -------------------------------------------------------------------------------- /Resources/config/steps.yml: -------------------------------------------------------------------------------- 1 | services: 2 | pim_enhanced_connector.step.csv_attribute.export: 3 | class: '%pim_connector.step.item_step.class%' 4 | arguments: 5 | - 'export' 6 | - '@event_dispatcher' 7 | - '@akeneo_batch.job_repository' 8 | - '@pim_connector.reader.database.attribute' 9 | - '@pim_enhanced_connector.processor.normalization.attribute' 10 | - '@pim_connector.writer.file.csv_attribute' 11 | 12 | pim_enhanced_connector.step.csv_family.export: 13 | class: '%pim_connector.step.item_step.class%' 14 | arguments: 15 | - 'export' 16 | - '@event_dispatcher' 17 | - '@akeneo_batch.job_repository' 18 | - '@pim_connector.reader.database.family' 19 | - '@pim_enhanced_connector.processor.normalization.family' 20 | - '@pim_connector.writer.file.csv_family' 21 | -------------------------------------------------------------------------------- /Resources/public/js/activated-locales-list.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Activated locales select field 5 | * 6 | * @author Anaël CHARDAN 7 | * @copyright 2017 Akeneo SAS (http://www.akeneo.com) 8 | * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 9 | */ 10 | define([ 11 | 'jquery', 12 | 'underscore', 13 | 'oro/translator', 14 | 'pim/fetcher-registry', 15 | 'pim/job/common/edit/field/select' 16 | ], function ( 17 | $, 18 | _, 19 | __, 20 | FetcherRegistry, 21 | SelectField 22 | ) { 23 | return SelectField.extend({ 24 | /** 25 | * {@inherit} 26 | */ 27 | configure: function () { 28 | return $.when( 29 | FetcherRegistry.getFetcher('locale').fetchActivated(), 30 | SelectField.prototype.configure.apply(this, arguments) 31 | ).then(function (activatedLocalesList) { 32 | if (_.isEmpty(activatedLocalesList)) { 33 | this.config.readOnly = true; 34 | this.config.options = {'NO OPTION': __('pim_enhanced_connector.family_processor.locale.no_locale')}; 35 | } else { 36 | var codes = {}; 37 | 38 | _.each(activatedLocalesList, function (locale, index) { 39 | codes[locale.code] = locale.code; 40 | }); 41 | 42 | this.config.options = codes; 43 | } 44 | }.bind(this)); 45 | } 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /Resources/translations/jsmessages.en.yml: -------------------------------------------------------------------------------- 1 | pim_enhanced_connector: 2 | family_processor: 3 | locale: 4 | label: Label locale 5 | help: Choose in which language you want to export the family label 6 | no_locale: There is no locale activated 7 | -------------------------------------------------------------------------------- /Resources/translations/jsmessages.fr.yml: -------------------------------------------------------------------------------- 1 | pim_enhanced_connector: 2 | family_processor: 3 | locale: 4 | label: Locale label 5 | help: Choisissez la langue d'export de vos labels de familles 6 | no_locale: Il n'y a pas de locale active 7 | -------------------------------------------------------------------------------- /Resources/translations/messages.en.yml: -------------------------------------------------------------------------------- 1 | pim_enhanced_connector: 2 | export: 3 | pimgento: 4 | family: 5 | title: Export families to CSV for PimGento 6 | attribute: 7 | title: Export attributes to CSV for PimGento 8 | family_processor: 9 | locale: 10 | label: Label locale 11 | help: Choose in which language you want to export the family label 12 | 13 | batch_jobs: 14 | pimgento_csv_attribute_export: 15 | label: Export attributes to CSV for PimGento 16 | export.label: Export attributes to CSV for PimGento 17 | pimgento_csv_family_export: 18 | label: Export families to CSV for PimGento 19 | export.label: Export families to CSV for PimGento 20 | -------------------------------------------------------------------------------- /Resources/translations/messages.fr.yml: -------------------------------------------------------------------------------- 1 | pim_enhanced_connector: 2 | export: 3 | pimgento: 4 | family: 5 | title: Export des familles en CSV pour PimGento 6 | attribute: 7 | title: Export des attributs en CSV pour PimGento 8 | family_processor: 9 | locale: 10 | label: Language du label 11 | help: Choisissez dans quelle langue vous souhaitez exporter le label de la famille 12 | 13 | batch_jobs: 14 | enhanced_csv_attribute_export: 15 | label: Export des attributs en CSV pour PimGento 16 | export.label: Export des attributs en CSV pour PimGento 17 | enhanced_csv_family_export: 18 | label: Export des familles en CSV pour PimGento 19 | export.label: Export des familles en CSV pour PimGento 20 | -------------------------------------------------------------------------------- /UPGRADE-1.3.md: -------------------------------------------------------------------------------- 1 | # UPGRADE FROM 1.2 to 1.3 2 | 3 | Some namespaces changed for Akeneo PIM 1.6 compatibility and you can reflect them in your custom by running the following commands: 4 | 5 | ```bash 6 | find ./src -type f -print0 | xargs -0 sed -i 's/Pim\\Bundle\\EnhancedConnectorBundle\\Processor\\AttributeToFlatArrayProcessor/Pim\\Bundle\\EnhancedConnectorBundle\\Processor\\Normalization\\AttributeProcessor/g' 7 | find ./src -type f -print0 | xargs -0 sed -i 's/Pim\\Bundle\\EnhancedConnectorBundle\\Processor\\FamilyToFlatArrayProcessor/Pim\\Bundle\\EnhancedConnectorBundle\\Processor\\Normalization\\FamilyProcessor/g' 8 | ``` 9 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "akeneo-labs/pim-enhanced-connector", 3 | "type": "symfony-bundle", 4 | "description": "Provides PIM product reader with more option (choice on completeness, choice on enabled, delta based on last export time)", 5 | "keywords": ["pim", "product", "export", "delta", "pimgento"], 6 | "homepage": "http://www.akeneo.com", 7 | "license": "OSL-3.0", 8 | "authors": [ 9 | { 10 | "name": "Akeneo", 11 | "homepage": "http://www.akeneo.com/" 12 | } 13 | ], 14 | "repositories": [ 15 | { 16 | "type": "vcs", 17 | "url": "https://github.com/akeneo/pim-community-dev.git", 18 | "no-api": true 19 | } 20 | ], 21 | "minimum-stability": "stable", 22 | "require": { 23 | "akeneo/pim-community-dev": "1.7.*" 24 | }, 25 | "require-dev": { 26 | "phpspec/phpspec": "3.0.0", 27 | "squizlabs/php_codesniffer": "@stable", 28 | "phpmd/phpmd": "@stable", 29 | "friendsofphp/php-cs-fixer": "@stable", 30 | "henrikbjorn/phpspec-code-coverage": "3.0.1" 31 | }, 32 | "autoload": { 33 | "psr-4": { "Pim\\Bundle\\EnhancedConnectorBundle\\": "" } 34 | }, 35 | "config": { 36 | "bin-dir": "bin" 37 | }, 38 | "extra": { 39 | "branch-alias": { 40 | "dev-master": "1.4.x-dev" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /phpspec-scrutinizer.yml: -------------------------------------------------------------------------------- 1 | extensions: 2 | - PhpSpec\Extension\CodeCoverageExtension 3 | code_coverage: 4 | format: 5 | - clover 6 | output: 7 | clover: coverage.clover 8 | -------------------------------------------------------------------------------- /spec/Pim/Bundle/EnhancedConnectorBundle/Processor/Normalization/AttributeProcessorSpec.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class AttributeProcessorSpec extends ObjectBehavior 12 | { 13 | function let(Processor $baseProcessor) 14 | { 15 | $this->beConstructedWith($baseProcessor); 16 | } 17 | 18 | function it_is_a_processor() 19 | { 20 | $this->shouldImplement('Akeneo\Component\Batch\Item\ItemProcessorInterface'); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spec/Pim/Bundle/EnhancedConnectorBundle/Processor/Normalization/FamilyProcessorSpec.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class FamilyProcessorSpec extends ObjectBehavior 13 | { 14 | function let(NormalizerInterface $transNormalizer, LocaleRepositoryInterface $localeRepository) 15 | { 16 | $this->beConstructedWith($transNormalizer, $localeRepository); 17 | } 18 | 19 | function it_is_a_processor() 20 | { 21 | $this->shouldImplement('Akeneo\Component\Batch\Item\ItemProcessorInterface'); 22 | } 23 | } 24 | --------------------------------------------------------------------------------