Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum | Blog (1) | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2023-08-13 (1 month ago) ![]() | Not yet rated by the users | Total: 50 This week: 2 | All time: 10,538 This week: 48![]() |
Version | License | PHP version | Categories | |||
easyconfigbundle 1.0 | The PHP License | 7 | HTML, Libraries, Configuration, PHP 7 |
Description | Authors Mamun Ahmed Contributor | |||
This package can be used to implement application configuration management using forms. Innovation Award
|
|
Open a command console, enter project directory and execute the following command to download the latest stable version of this bundle:
$ composer require xiidea/easy-config
The bundle should be automatically enabled by Symfony Flex. If you don't use Flex, you will need to enable the bundle manually by adding the following line in the config/bundles.php file of your project:
<?php
// src/Kernel.php
return [
// ...
Xiidea\EasyConfigBundle\XiideaEasyConfigBundle::class => ['all' => true],
];
Open application Kernel.php File and add below code inside the build method of this file
<?php
// src/Kernel.php
public function build(ContainerBuilder $container)
{
// ...
$container->registerForAutoconfiguration(ConfigGroupInterface::class)
->addTag('xiidea.easy_config.group');
}
_Note: Do not forget to include the below line above in your src/Kernel.php_
use Xiidea\EasyConfigBundle\Services\FormGroup\ConfigGroupInterface;
By default EasyConfigBundle
supports Doctrine ORM. However, you must provide an Entity class and the class has to extend the class \Xiidea\EasyConfigBundle\Model\BaseConfig
. To configure the Entity class properly please follow the detailed instructions.
Create a file in the following directory config/packages
with the exact name xiidea_easy_config.yaml
A sample config file is available in this path Resources/config/config-sample.yml
. Copy this sample file's content and paste to just created file. Do not forget to change your Entity class name which has been mentioned in Step 3.
# Xiidea Easy Config Configuration Sample
xiidea_easy_config:
config_class: App\Entity\Configuration
It?s time to set up the database schema, open your command console, go to your project root path and execute the following command.
$ php bin/console doctrine:schema:update --force
Create a form group class and form type with your necessary fields. Please follow the instructions to create the form group and type.
Now it's time to access the form you have just created, for that you have to include bundle's routes to your application by the following way.
xiidea_config_route:
resource: "@XiideaEasyConfigBundle/Resources/config/routes.yaml"
prefix: '/config'
_Note: You may change the prefix as your wish_
Following routes are available in this bundle:
* Index route (prefix/)
: List of all forms
* Form group route (prefix/group_key)
: Form of specific group key
Template overriding is not important to use EasyConfigBundle bundle but if you want to keep UI as similar as your application you can override the template, to do so follow the instructions
Congratulations !
Your application is ready to store configurations, just browse the routes.
The Easy Config Bundle is licensed under the MIT license. See the LICENSE file for more details.
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Doc. | Read me | ||
![]() |
Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.