heimrichhannot / contao-code-generator-bundle
This module offers comfortable code generation based on separated configurations for Contao.
Installs: 207
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 6
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^8.1
- contao/core-bundle: ^4.13 || ^5.0
- hackzilla/password-generator: ^1.4
- heimrichhannot/contao-utils-bundle: ^2.238 || ^3.4
README
This module offers comfortable code generation based on separated configurations for Contao.
Code config preview
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
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); } }