2017 © Pedro Peláez
 

symfony-bundle ezloremipsumbundle

Kaliop eZ-Lorem-Ipsum Bundle

image

kaliop/ezloremipsumbundle

Kaliop eZ-Lorem-Ipsum Bundle

  • Sunday, June 24, 2018
  • by gggeek
  • Repository
  • 1 Watchers
  • 0 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 6 Versions
  • 214 % Grown

The README.md

ezloreimpsumbundle

A bundle for eZPublish5 / eZPlatform dedicated to mass-creation of sample/test content., (*1)

How it works, in 30 lines of yaml

    -
        type: loop
        repeat: 5
        steps:
            -
                type: content
                mode: create
                content_type: folder
                parent_location: 2
                attributes:
                    name: "Folder [loop:iteration] - [faker:sentence(3)]"
                references:
                    -
                        attribute: location_id
                        identifier: parent_folder_loc
                        overwrite: true
            -
                type: loop
                repeat: 3
                steps:
                    -
                        type: content
                        mode: create
                        content_type: folder
                        parent_location: reference:parent_folder_loc
                        attributes:
                            name: "Folder [faker:unixTime]"

As you can probably guess from the above, this code will create a total of 20 contents of type 'Folder', nested in 2 levels, with each top-level folder having 3 children. The names of the top-level folders include 3 random latin words each., (*2)

Requirements

  • eZPublish 2014.11 or later or eZPlatform
  • eZMigrationBundle
  • Faker from FZaninotto
  • TCPDF from tecnick.com

(all of the above are handled automatically using composer), (*3)

Installation

  1. get the bundle via composer, (*4)

    composer require kaliop/ezloremipsumbundle
    
  2. activate it in your Kernel's registerBundles() method, (*5)

    public function registerBundles()
    {
        ...
        new \Kaliop\eZLoremIpsumBundle\EzLoremIpsumBundle()
    

Usage

All this bundle does is to make available to the Kaliop Migration Bundle a new reference resolver, called faker., (*6)

This means that in order to create massive amounts of contents, you will just need to set up and run a 'migration'. Migrations are fully documented at: https://github.com/kaliop-uk/ezmigrationbundle/ and https://github.com/kaliop-uk/ezmigrationbundle/tree/master/Resources/doc/DSL, (*7)

The 'faker' reference resolver is designed generated random pieces of data. It purposes to support all of the features of the Faker library. In no particular order, it can be used to generate: - phrases - paragraphs - names - addresses - phone numbers - dates and times - emails - domain names - numbers - images and files, (*8)

The full list of supported data is documented at https://github.com/fzaninotto/Faker, (*9)

A more detailed description of the supported syntax is given in the DSL Language description, (*10)

NB there is a known bug when using the image provider and there is a problem downloading an image file from the remote service. The recommended workaround is to use the picture provider instead., (*11)

Thanks

Many thanks to Crevillo for the suggestion to look at AliceBundle and to FZaninotto for all the heavy lifting, (*12)

License Latest Stable Version Total Downloads, (*13)

Scrutinizer Code Quality, (*14)

The Versions

24/06 2018

dev-master

9999999-dev

Kaliop eZ-Lorem-Ipsum Bundle

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

ezpublish ezplatform

26/05 2018
16/05 2018
15/05 2018

1.2

1.2.0.0

Kaliop eZ-Lorem-Ipsum Bundle

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

ezpublish ezplatform

14/05 2018

1.1

1.1.0.0

Kaliop eZ-Lorem-Ipsum Bundle

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

ezpublish ezplatform

11/05 2018

1.0.0

1.0.0.0

Kaliop eZ-Lorem-Ipsum Bundle

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

ezpublish ezplatform