Download the PHP package isom/code-maker without Composer
On this page you can find all versions of the php package isom/code-maker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download isom/code-maker
More information about isom/code-maker
Files in isom/code-maker
Package code-maker
Short Description CodeMakerBundle is a very simple and powerful coding system that will allow you to implement a completely custom coding strategy for your entities.
License MIT
Informations about the package code-maker
CodeMakerBundle
While developing management applications, we often face a lot of difficulties when implementing a dynamic coding system for our entities such as (customers, suppliers, invoices, products, ...). That's where CodeMaker will make your life mutch easier by offering you a very simple yet powerful coding system.
Installation
composer require isom/code-maker
- Enable the bundle in AppKernel.php
new SBC\CodeMakerBundle\CodeMakerBundle()
-
Add this in
config/routing.yml
-
Add this in
config/config.yml
- Run
php bin/console doctrine:schema:update --force
Usage
Now let's say that you have an entity called Product
and you want to generate a new custom string id every time when a new product is created, then you need to do the following things:
1. Step 1
Create your Product
entity and implement the CodeMaker
annotation
displayName
: a simple name that will be used by CodeMakerBundle's coding systemcodeColumn
: the field considered as unique identifier (it can be the identifier of the entity or another field)discriminatorColumn
: we will see them in a specific partdiscriminations
: we will see them in a specific part
2. Step 2
Now after the implementation of the CodeMaker
annotation the entity will be known by the coding system and all that remains is to create our famous Generator
2.1. Create Generator with console mode
2.2. Create Generator with graphic interface mode
All versions of code-maker with dependencies
symfony/framework-bundle Version ^2.8 || ^3.4.12
doctrine/doctrine-bundle Version *
doctrine/orm Version ^2.5
twig/twig Version ^1.0||^2.0