2017 © Pedro Peláez
 

library zfc-user-simple-settings

A solid little "user settings" addition to your ZfcUser Doctrine entity; with configurable defaults.

image

illchuk/zfc-user-simple-settings

A solid little "user settings" addition to your ZfcUser Doctrine entity; with configurable defaults.

  • Tuesday, November 14, 2017
  • by dillchuk
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

ZfcUserSimpleSettings

Build Status, (*1)

A solid little "user settings" addition to your ZfcUser Doctrine entity; with configurable defaults., (*2)

Installation

Install with composer require illchuk/zfc-user-simple-settings, (*3)

Then include in your modules.config.php:, (*4)

[..., 'ZfcUser', 'ZfcUserSimpleSettings', ...]

Finally, drop it into your User entity like the following:, (*5)

class User extends ZfcEntityUser implements SettingsInterface {

    use SettingsTrait;
    // ...
}

Configuration

Configure the default values by installing the auto-config file., (*6)

Then add the lifecycle listener as follows:, (*7)

    '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., (*8)

The Versions

14/11 2017

dev-master

9999999-dev https://github.com/dillchuk/ZfcUserSimpleSettings

A solid little "user settings" addition to your ZfcUser Doctrine entity; with configurable defaults.

  Sources   Download

MIT

The Requires

 

The Development Requires

settings doctrine zfcuser zf3