illchuk / zfc-user-simple-settings
A solid little "user settings" addition to your ZfcUser Doctrine entity; with configurable defaults.
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/illchuk/zfc-user-simple-settings
Requires
- php: ^5.6|^7.0
- beaucal/beaucal-util: ^0.1
- doctrine/doctrine-orm-module: ^1.0
- doctrine/orm: ^2.5
- phpoption/phpoption: ^1.0
Requires (Dev)
- fzaninotto/faker: ^1.7
- phpunit/dbunit: 2.0.x-dev
- phpunit/phpunit: ~4.0
- zendframework/zend-db: ^2.6
- zendframework/zend-servicemanager: ^3.0
This package is auto-updated.
Last update: 2025-10-08 14:23:01 UTC
README
A solid little "user settings" addition to your ZfcUser Doctrine entity; with configurable defaults.
Installation
Install with composer require illchuk/zfc-user-simple-settings
Then include in your modules.config.php:
[..., 'ZfcUser', 'ZfcUserSimpleSettings', ...]
Finally, drop it into your User entity like the following:
class User extends ZfcEntityUser implements SettingsInterface {
    use SettingsTrait;
    // ...
}
Configuration
Configure the default values by installing the auto-config file.
Then add the lifecycle listener as follows:
    'doctrine' => [
        'eventmanager' => [
            'orm_default' => [
                'subscribers' => [
                    \ZfcUserSimpleSettings\Entity\Listener\SettingsLifecycle::class,
                ],
            ],
        ],
    ],
Bonus
This functionality can actually be applied to any Doctrine entity; ZfcUser isn't actually required.