Download the PHP package lsb/numbering-bundle without Composer
On this page you can find all versions of the php package lsb/numbering-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lsb/numbering-bundle
More information about lsb/numbering-bundle
Files in lsb/numbering-bundle
Package numbering-bundle
Short Description Number generator for Symfony applications
License MIT
Homepage https://lsb.pl
Informations about the package numbering-bundle
LSBNumberingBundle
This bundle provides functionality of generating subsequent numbers for any given object e.g. Order, Invoice etc. in Symfony 5 applications.
It creates a simple config in system database, which stores current counter and context data.
Installation
Configuration
Configure the bundle by defining patterns and counter config data in lsb_numbering.yaml file.
Rules of configuration:
- Number patterns can be defined by any string with predefined tags (see Tags section)
- Tags must be enclosed in curly brackets
- Only {number} tag is required
- Counters can work in time context
- Some tags can be followed by a length modifier e.g {year|2}, {number|6} which limits the resolved value to the given length.
Tags:
Tag name | Required | Modifiers | Description |
---|---|---|---|
{number} | yes | length | current value of the counter |
{year} | no | length [2,4] | current year |
{semester} | no | - | current semester of the year |
{quarter} | no | - | current quarter of the year |
{month} | no | - | current month of the year |
{week} | no | - | current week of the year |
{day} | no | - | current day of the year |
{context_object} | no | - | context object value |
Usage
A subject object is any object you want to generate numbers for. It needs to implement NumberableInterface.
Example of usage NumberingGenerator service
License
LSBNumberingBundle is available under an MIT License.
All versions of numbering-bundle with dependencies
symfony/framework-bundle Version 5.0.*
doctrine/orm Version 2.*
doctrine/doctrine-bundle Version 2.*
symfony/validator Version 5.0.*