PHPackages                             pdir/key-generator-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pdir/key-generator-bundle

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

pdir/key-generator-bundle
=========================

Key Generator Wizard for Contao 4

1.2.0(3y ago)034LGPL-3.0+PHPPHP ^5.6 || ^7.0 || ^8.0

Since Nov 26Pushed 3y agoCompare

[ Source](https://github.com/pdir/key-generator-bundle)[ Packagist](https://packagist.org/packages/pdir/key-generator-bundle)[ Docs](https://pdir.de)[ RSS](/packages/pdir-key-generator-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (4)Used By (0)

Contao 4 Key Generator Wizard
=============================

[](#contao-4-key-generator-wizard)

This extension is for Contao 4 and enhances the BE TextField Widget with a keyGenerator Wizard See example:

```
$GLOBALS['TL_DCA']['tl_member']['fields']['apikey'] = array
(
  'label'         => &$GLOBALS['TL_LANG']['tl_member']['apikey'],
	'exclude'       => true,
	'search'        => false,
	'inputType'     => 'text',
	'wizard'		=> [['\Pdir\KeyGeneratorBundle\KeyGenerator','getWizard']],
	'save_callback'	=> [['\Pdir\KeyGeneratorBundle\KeyGenerator','setKeyIfEmpty']],
	'eval'          => ['maxlength'=>32, 'feEditable'=>false, 'feViewable'=>false, 'feGroup'=>'rpc', 'tl_class'=>'w50 wizard'],
	'sql'           => "varchar(32) NOT NULL default ''"
);
```

You can write your own generator. Use the HOOK

The callback method gets the fieldName and the maxlength. It returns a new key-string or false if the method don't want to set the key

```
// config.php
$GLOBALS['TL_HOOKS']['generateKey'][] = array('\MyClass','generateKey');

// MyClass
public function generateKey($strFieldName, $intLength)
{
  if ($strFieldName == 'simplePasswordField')
  {
    return str_repeat('X',$intLength);
  }
  else if ($strFieldName == 'megaPasswordField')
  {
    return 'pasword123';
  }
  return false;
}
```

Original by [Sebastian Tilch 2012](https://github.com/mediabakery/contao-KeyGenerator) for Contao 3

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 61.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~532 days

Total

3

Last Release

1301d ago

PHP version history (2 changes)1.0.0PHP ^5.6 || ^7.0

1.2.0PHP ^5.6 || ^7.0 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10244240?v=4)[Mathias Arzberger](/maintainers/MDevster)[@MDevster](https://github.com/MDevster)

---

Top Contributors

[![mediabakery](https://avatars.githubusercontent.com/u/1691826?v=4)](https://github.com/mediabakery "mediabakery (11 commits)")[![MDevster](https://avatars.githubusercontent.com/u/10244240?v=4)](https://github.com/MDevster "MDevster (3 commits)")[![seibtph](https://avatars.githubusercontent.com/u/17127525?v=4)](https://github.com/seibtph "seibtph (2 commits)")[![xat](https://avatars.githubusercontent.com/u/182512?v=4)](https://github.com/xat "xat (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/pdir-key-generator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/pdir-key-generator-bundle/health.svg)](https://phpackages.com/packages/pdir-key-generator-bundle)
```

###  Alternatives

[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[madeyourday/contao-rocksolid-custom-elements

Create your own, nestable content elements using a modular system. End the WYSIWYG chaos with your own content elements.

50341.9k12](/packages/madeyourday-contao-rocksolid-custom-elements)[codefog/contao-news_categories

News Categories bundle for Contao Open Source CMS

3183.3k6](/packages/codefog-contao-news-categories)[terminal42/contao-folderpage

Provides a new page type for Contao that allows you to group pages into folders.

18147.9k9](/packages/terminal42-contao-folderpage)[inspiredminds/contao-wowjs

Integrates WOW.js for Contao content elements and form fields.

1813.0k](/packages/inspiredminds-contao-wowjs)[inspiredminds/contao-glightbox

Contao extension to integrate GLightbox.

1223.3k1](/packages/inspiredminds-contao-glightbox)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
