dcs / role-provider-array-bundle
The DCSRoleProviderArrayBundle provides the management of the roles with an array configuration
Installs: 6
Dependents: 0
Suggesters: 1
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.9
Requires (Dev)
- dcs/role-core-bundle: ~1.0@dev
- dcs/user-core-bundle: ~1.0@dev
- phpunit/phpcov: 3.*
- phpunit/phpunit: ^5
- satooshi/php-coveralls: ~1.0
- symfony/security: ~2.8|~3.0
This package is not auto-updated.
Last update: 2024-11-21 01:56:51 UTC
README
DCSRoleProviderArrayBundle
This bundle provides the provider implementation for DCSRoleCoreBundle. The logic of this provider revolves around the role management through array. Then the database of roles available in the application will be configured in the bundle settings.
There is a trait (UserRoleArray) that will expose some utility methods for role management to use in the implementation of the User class.
Installation
Prerequisites
This bundle requires DCSRoleCoreBundle.
Require the bundle
Run the following command:
$ composer require dcs/role-provider-array-bundle "~1.0@dev"
Composer will install the bundle to your project's vendor/dcs/role-provider-array-bundle
directory.
Enable the bundle
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new DCS\Role\Provider\ArrayBundle\DCSRoleProviderArrayBundle(),
// ...
);
}
Configure
Now that you have properly enabled this bundle, the next step is to configure it to work with the specific needs of your application.
Add the following configuration to your config.yml
.
dcs_role_provider_array:
roles: LIST_OF_ROLES_AS_ARRAY
The following lines provide the configuration for the DCSRoleCoreBundle.
dcs_role_core:
provider: dcs_role.provider.array
Reporting an issue or a feature request
Issues and feature requests are tracked in the Github issue tracker.