Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heimrichhannot/contao-code-generator-bundle
Generate code from backend or programmatically.
https://github.com/heimrichhannot/contao-code-generator-bundle
contao
Last synced: about 1 month ago
JSON representation
Generate code from backend or programmatically.
- Host: GitHub
- URL: https://github.com/heimrichhannot/contao-code-generator-bundle
- Owner: heimrichhannot
- License: lgpl-3.0
- Created: 2018-02-15T09:02:21.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-09T13:18:22.000Z (6 months ago)
- Last Synced: 2024-09-15T22:10:24.596Z (3 months ago)
- Topics: contao
- Language: PHP
- Homepage:
- Size: 255 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Code Generator
This module offers comfortable code generation based on separated configurations for Contao.
![alt Preview](doc/screenshot.png)
*Code config preview*
![alt List view](doc/screenshot2.png)
*List view*
## Features
- offers a code configuration entity
- offers a service to create codes
- criteria:
- prevent ambiguous characters
- prevent double codes
- limit to certain alphabets (numbers, capitals, ...)
- add rules like "at least one number"
- one-click-creation of an arbitrary number of codes## Developers
```php
use HeimrichHannot\CodeGeneratorBundle\Code\Criteria;
use HeimrichHannot\CodeGeneratorBundle\Code\Generator;class Example
{
public function __construct(
private readonly Generator $generator
) {}
public function generatePasswort(): string
{
$criteria = new Criteria();
$criteria->allowSymbols = true;
$criteria->length = 14;
$criteria->requireNumbers = true;
$criteria->requireSymbols = true;
return $this->generator->generate($criteria);
}
}
```