akeneo-labs/custom-entity-bundle

Akeneo PIM Custom entity bundle

Installs: 49 502

Dependents: 7

Suggesters: 0

Stars: 40

Watchers: 28

Forks: 30

Open Issues: 16

Type:symfony-bundle


README

Scrutinizer Code Quality Build Status

Facilitates the creation of PIM reference data and related views in the PIM.

For more information, please see http://docs.akeneo.com/

Requirements

CustomEntityBundle Akeneo PIM Community Edition
v3.0.* v3.0.*
v2.4.* v2.3.*
v2.3.* v2.2.*
v2.2.* v2.1.*
v2.1.* v2.1.*
v2.0.* v2.0.*
v1.10.* v1.7.*

Installation

You can install this bundle with composer (see requirements section):

    php composer.phar require "akeneo-labs/custom-entity-bundle":"3.0.*"

Then add the following lines at the end of your app/config/routing.yml :

    pim_customentity:
        prefix: /reference-data
        resource: "@PimCustomEntityBundle/Resources/config/routing.yml"

and enable the bundle in the app/AppKernel.php file in the registerProjectBundles() method:

    $bundles = [
        // ...
        new \Pim\Bundle\CustomEntityBundle\PimCustomEntityBundle(),
    ]

If your installation is already set up, you have to run the following command in order to add the quick export job:

    php bin/console akeneo:batch:create-job "Akeneo Mass Edit Connector" "csv_reference_data_quick_export" "quick_export" "csv_reference_data_quick_export" '{"delimiter": ";", "enclosure": "\"", "withHeader": true, "filePath": "/tmp/reference_data_quick_export.csv"}'

Documentation

The reference data documentation can be found in the PIM documentation.

Detailled information can be found in the bundle documentation.

Run the Tests

Unit tests

    $ composer install
    $ vendor/bin/phpspec run

Code style

    $ composer install
    $ vendor/bin/php-cs-fixer fix -v --diff --config .php_cs.php

PHPUnit

  • Install an Akeneo PIM with the CustomEntityBundle
  • Copy Tests/Resources/phpunit.xml into your base app directory
  • Copy Tests/Resources/parameters_test.yml or Tests/Resources/parameters_test_ee.yml (depending on your PIM version) to app/config/parameters_test.yml, and edit accordingly to your config

Then:

    $ php bin/console cache:clear --no-warmup --env=test
    $ php bin/console pim:installer:db --env=test
    $ vendor/bin/phpunit -c app/phpunit.xml

Contributing

If you want to contribute to this open-source project, thank you to read and sign the following contributor agreement