silversolutions/content-loader-bundle

There is no license information available for the latest version (v4.0.0) of this package.

Symfony bundle for loading eZ Publish content features and fixtures for tests

v4.0.0 2018-10-30 11:09 UTC

This package is auto-updated.

Last update: 2024-04-29 03:47:26 UTC


README

Build Status

There is 2 main ideas behind this bundle:

  • Load collections of items (content types, user roles, users, content items) to eZ Publish database from straight-forward yaml files.
  • Load fixtures for tests.

You can describe an initial state of your application in yaml format and use it either for project installation or for running tests in a test environment.

Example. Lets consider you have a file Resources/example/article.yml:

languages:
    english:
        language_code: eng-US
        name: English (US)
        
content_types:
  article:
      identifier: content_article
      names:
          eng-US: Article
      name_schema: <name>
      field_definitions:
          name:
              identifier: name
              field_type_identifier: ezstring
              names:
                  eng-US: Name
          ses_short_description:
              identifier: description
              field_type_identifier: ezxmltext
              names:
                  eng-US: 'Description'
                  
content:                  
    impressum:
      content_type: article
          fields:
              title:
                  eng-US: Impressum
              intro:
                  eng-US: <paragraph>This article describes how to use ContentLoaderBundle.</paragraph>

After you run a command:

ezpublish/console siso:fixtures:load /path/to/article.yml

... you'll have:

  • new content language 'English (US)' with the code 'eng-US',
  • new content type 'content_article',
  • and new content item 'Impressum' created under the eZ Publish main node.

Supported features

  • Content languages
  • Content types
  • Roles
  • User groups
  • Users
  • Content items

Unsupported features

  • Sections
  • Object states

Limitations

  • Currently the bundle mainly useful for creating new items. Update of existing content is supported only for content types.
  • DatabaseSchemaLoader supports only mysql

See also