2017 © Pedro Peláez
 

library ez-fieldtype-generator-bundle

image

bdunogier/ez-fieldtype-generator-bundle

  • Thursday, April 27, 2017
  • by bdunogier
  • Repository
  • 2 Watchers
  • 3 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

eZ FieldType generator

Status

This is a proof-of-concept/prototype. It generates a Type and a Value class, as well as a fieldtypes.yml that registers the fieldtype, but the class name, namespace, etc are still wrong., (*1)

Installation

Since the package isn't registered on packagist yet, you need to add a VCS entry to \ composer.json`:, (*2)

Require the ezobject/wrapperbundle package into your composer.json file :, (*3)

{
    "repositories": [
        { "type": "vcs", "url": "https://github.com/bdunogier/ez-fieldtype-generator-bundle.git" }
    ],
    "require": {
        "bdunogier": "dev-master"
    }
}

Add BDEzFieldTypeGeneratorBundle to EzPublishKernel.php:, (*4)

$bundles = array(
    // ...
    new BD\EzFieldTypeGeneratorBundle\BDEzFieldTypeGeneratorBundle(),
);

Usage

php ezpublish/console generate:ez:fieldtype

When asked for the name of the bundle, use an existing bundle. If you don't have one for it, generate one using generate:bundle first., (*5)

The script will then ask for the fieldtype's name, that is really the fieldtype's identifier., (*6)

Confirm generation, and the files will be written to the bundle:, (*7)

$ php app/console generate:ez:fieldtype

  Welcome to the eZ FieldType generator

Your FieldType must be created in a bundle.

If you don't have a bundle for it, please create one using generate:bundle first
Target bundle name: BDTestBundle

A FieldType requires a unique identifier.
Identifiers can contain alphanumeric characters as well as underscores

FieldType name: bdtest

  Summary before generation


You are going to generate a "bdtest" FieldType in the "BDTestBundle" bundle.

Do you confirm generation [yes]?
Generating the FieldType code: OK

The Versions

27/04 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

08/03 2017

dev-generator_v2

dev-generator_v2

  Sources   Download

MIT

The Requires

 

07/03 2017

dev-generator_v2_console_form

dev-generator_v2_console_form

  Sources   Download

MIT

The Requires