Giter VIP home page Giter VIP logo

pimcorefixtures's Introduction

Pimcore YML fixtures

Based on Alice

How to install

composer require youwe/pimcore-fixtures

This plugin is only for DEV, do NOT install on a production server

How to load fixtures

You must enable the bundle as followed php bin/console pimcore:bundle:enable FixtureBundle. To check if the bundle is installed correctly php bin/console pimcore:bundle:list. Place your fixtures in /var/bundles/FixtureBundle/fixtures named "001_object_name.yml", "002_object_name.yml" etc.

Example fixture for creating a folder

# 001_folders.yml
# Object folders
Pimcore\Model\Object\Folder:
    products_folder:
        key: products
        path: /
        parentId: 1

Load them with:

Console

php bin/console fixture:load --with-cache

Load individual files with --files comma separated files without yml extension:

Console

php bin/console fixture:load --files filename1,filename2

Backend

Go to Extensions \ PimcoreFixtures \ plugin settings \ Load fixtures

Fixtures generator (still beta)

Backend

Go to Extensions \ PimcoreFixtures \ plugin settings

  1. Object path: the root where to start generating fixtures
  2. Object name: Recommended would be the object class ex. product, will translate into at [PIMCORE_ROOT]/website/var/plugins/PimcoreFixtures/fixtures/000_product.yml
  3. Max level deep: Will stop at the specified level (default 1) and if greater then 1 then level will be appended to filename
  4. Click generate. The generated files should be at [PIMCORE_ROOT]/website/var/plugins/PimcoreFixtures/fixtures/*.yml

Console

php bin/console fixtures:generate

Delete object/assets/documents

php bin/console fixtures:delete-path  -t object -p /products

Useful links

Todo:

  • Support for following fields one fixtures:generate

    • Object\ClassDefinition\Data\Classificationstore
    • Object\ClassDefinition\Data\Fieldcollection
    • Object\ClassDefinition\Data\ObjectsMetadata
    • Object\ClassDefinition\Data\MultihrefMetadata
    • Object\ClassDefinition\Data\Objectbricks
  • security checks / user restrictions

  • better error handling in ext-js interface

  • live progress when loading fixtures

pimcorefixtures's People

Contributors

eazyalvaro avatar faridmovsumov avatar griselta avatar jorisros avatar paulovitorbal avatar qiang-youwe avatar sunohara666 avatar vmalyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pimcorefixtures's Issues

Pimcore 6 support

I would like to use your module for easy creation of fixtures in a functional test.
However we are using pimcore 6.3.3 and your module has conflicting version constraints. It only allows for pimcore 5 in the composer.json.
Any chance you can add pimcore 6 support?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.