2017 © Pedro PelĂĄez
 

library akeneo-connector-base

Base tools to build Akeneo connectors, released with ready-to-use bundles.

image

kiboko/akeneo-connector-base

Base tools to build Akeneo connectors, released with ready-to-use bundles.

  • Wednesday, September 21, 2016
  • by gplanchat
  • Repository
  • 1 Watchers
  • 4 Stars
  • 9 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Akeneo Connector Utils

TL;DR

This component brings tools and utilities for connectors developers., (*1)

This adapter brings :, (*2)

  • XML data source parsing tools
  • Attribute option value discovering
  • Attribute list input
  • Assets processor (images attributes)
  • Variant group assets export
  • Dummy reader/processor/writer
  • Utility traits for your connectors

Versions

PIM version Component version
1.6.* 1.2.*
1.5.* 1.1.*
1.4.* 1.0.*

Note : From version 1.1, namespace changed from Luni\Component\Connector to Kiboko\Component\Connector, (*3)

Utilities

AttributeManager

This helps you to create parameterizable connectors:, (*4)

<?php

$attributeManager = new Kiboko\Component\Connector\Manager\AttributeManager($attributeRepository);
$attributeManager->getAttributeChoices('pim_catalog_image'),

This is used for a media assets exporting job, like ProductAssetsProcessor, (*5)

# Resources/config/readers.yml
parameters:
    luni_connector.reader.dummy_item.class: Kiboko\Component\Connector\Processor\DummyReader

services:
    luni_connector.reader.dummy_item:
        class: '%luni_connector.reader.dummy_item.class%'
# Resources/config/processors.yml
parameters:
    luni_connector.processor.dummy_item.class: Kiboko\Component\Connector\Processor\DummyProcessor

services:
    luni_connector.processor.dummy_item:
        class: '%luni_connector.processor.dummy_item.class%'
# Resources/config/writers.yml
parameters:
    luni_connector.writers.dummy_item.class: Kiboko\Component\Connector\Processor\DummyWriter

services:
    luni_connector.writers.dummy_item:
        class: '%luni_connector.writers.dummy_item.class%'

ProductAssetsProcessor and VariantGroupAssetsProcessor

These processors are suited for Magento assets exporting from Akeneo CE, when you have created multiple image attributes., (*6)

Assets export manager, (*7)

In your bundle, you will need theses configurations:, (*8)

# Resources/config/services.yml
parameters:
    acme_dummy_connector.manager.attributes.class: Kiboko\Component\Connector\Manager\AttributeManager

    acme_dummy_connector.job.job_parameters.validator.image_attribute_validator.class:      Kiboko\Component\Connector\JobParameters\Constraint\ImageAttributeValidator
    acme_dummy_connector.job.job_parameters.validator.image_attribute_list_validator.class: Kiboko\Component\Connector\JobParameters\Constraint\ImageAttributeListValidator

    acme_dummy_connector.job.job_parameters.default_values_provider.assets_export.class:        Kiboko\Component\Connector\JobParameters\DefaultValuesProvider\ProductAssetsExport
    acme_dummy_connector.job.job_parameters.constraint_collection_provider.assets_export.class: Kiboko\Component\Connector\JobParameters\ConstraintCollectionProvider\ProductAssetsExport
    acme_dummy_connector.job.job_parameters.form_configuration_provider.assets_export.class:     Kiboko\Component\Connector\JobParameters\FormConfigurationProvider\ProductAssetsExport
services:
    # Validation services
    validator.image_attribute:
        class: '%acme_dummy_connector.job.job_parameters.validator.image_attribute_validator.class%'
        arguments:
            - '@luni_assets.manager.attributes'
        tags:
            - { name: validator.constraint_validator }
    validator.image_attribute_list:
        class: '%acme_dummy_connector.job.job_parameters.validator.image_attribute_list_validator.class%'
        arguments:
            - '@luni_assets.manager.attributes'
        tags:
            - { name: validator.constraint_validator }

    # Default values for our JobParameters
    acme_dummy_connector.job.job_parameters.default_values_provider.assets_export:
        class: '%acme_dummy_connector.job.job_parameters.default_values_provider.assets_export.class%'
        arguments:
            -
                - 'assets_job' # the job name
        tags:
            - { name: akeneo_batch.job.job_parameters.default_values_provider }

    # Validation constraints for our JobParameters
    acme_dummy_connector.job.job_parameters.constraint_collection_provider.assets_export:
        class: '%acme_dummy_connector.job.job_parameters.constraint_collection_provider.assets_export.class%'
        arguments:
            -
                - 'assets_job' # the job name
        tags:
            - { name: akeneo_batch.job.job_parameters.constraint_collection_provider }

    # Form configuration for our JobParameters
    acme_dummy_connector.job.job_parameters.form_configuration_provider.assets_export:
        class: '%acme_dummy_connector.job.job_parameters.form_configuration_provider.assets_export.class%'
        arguments:
            -
                - 'assets_job' # the job name
        tags:
            - { name: pim_import_export.job_parameters.form_configuration_provider }

Added functionality in version 1.2

Ready to use bundle KibokoMediaAssetConnectorBundle

This bundle makes available the media assets export for Magento stores., (*9)

In your file app/AppKernel.php, add the bundle to your configuration, (*10)

    $bundles = [
        //...
        Kiboko\Bundles\MediaAssetConnectorBundle\KibokoMediaAssetConnectorBundle(),
        //...
    ];

Removed functionality in version 1.2

NameAwareTrait and ConfigurationAwareTrait traits

The traits NameAwareTrait and ConfigurationAwareTrait were removed in version 1.2, since Akeneo 1.6 changed its options retrieval in batch steps, (*11)

See Akeneo 1.6 changelog, (*12)

Kiboko\Component\Connector\Writer\File\CsvVariantGroupWriter writer

This writer is not needed anymore, (*13)

The Versions

21/09 2016

dev-master

9999999-dev

Base tools to build Akeneo connectors, released with ready-to-use bundles.

  Sources   Download

LGPL

The Requires

 

by Grégory PLANCHAT

09/08 2016

v1.1.x-dev

1.1.9999999.9999999-dev

Base tools to build Akeneo connectors

  Sources   Download

LGPL

The Development Requires

by Grégory PLANCHAT

19/06 2016

v1.1.0

1.1.0.0

Base tools to build Akeneo connectors

  Sources   Download

LGPL

The Development Requires

by Grégory PLANCHAT

19/06 2016

v1.0.x-dev

1.0.9999999.9999999-dev

Base tools to build Akeneo connectors

  Sources   Download

LGPL

The Development Requires

by Grégory PLANCHAT

16/03 2016

v1.0.0

1.0.0.0

Base tools to build Akeneo connectors

  Sources   Download

LGPL

The Development Requires

by Grégory PLANCHAT