kfit / yii2-parameters
Parameters Yii2
Requires
Requires (Dev)
- symfony/var-dumper: ^4.3@dev
This package is not auto-updated.
Last update: 2025-03-10 15:53:27 UTC
README
Introduction
Allows administration of application parameters in the Yii2 framework.
Installation
Using Composer
$ composer require kfit/yii2-parameters
Applying migrations
$ php yii migrate --migrationPath=@vendor/kfit/yii2-parameters/migrations
Config Web.php
'modules'=>[
'parameters' => [
'class' => '\kfit\parameters\Module',
'breadcrumbsBase' => [
['label' => 'Base', 'url' => ['/site/base']],
['label' => 'Base 2', 'url' => ['/site/base']],
],
'nameSessionEntity' => 'session.entity',
],
],
Additional Information
In the database once the migrations are executed, the following tables will be created:
Table name | Description |
---|---|
parameter_categories | This table stores the categories of the parameters. |
parameters | This table stores the parameter informatiĆ³n, type of element, options, mandatory, etc. |
parameter_values | This table stores the default values or the selected value for each entity. |
Data structure for the html_options column in the parameters table:
{
"html_options": {},
"widget_options": {}
}
In the html_options position, the configuration for the field to be created is stored, for example the popover, the custom classes or the structures to be painted. On the other hand, the widget_options position is used to store the widget configuration used, this only applies to fields that are not type, text or radio.
Data structure for columns with translations:
{
"default": "example text",
"language": {
"es": "Texto de ejemplo",
"fr": "Exemple de texte"
}
}
As we can see, in the default position we will put the default value for the translation and in the language position the translations for each language identifier will appear.
License
BSD-3-Clause. Created by: KulturFit Developer Team.