Skip to content

Commit 95d5456

Browse files
committed
Update licence and readme
1 parent b393f39 commit 95d5456

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2018-2019 Sherlockode
1+
Copyright (c) 2018-2023 Sherlockode
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,15 @@ Enable the bundle in the kernel
2828

2929
```php
3030
<?php
31-
// app/AppKernel.php
31+
// config/bundles.php
3232

33-
public function registerBundles()
34-
{
35-
$bundles = [
36-
// ...
37-
new Sherlockode\ConfigurationBundle\SherlockodeConfigurationBundle(),
38-
];
39-
}
33+
return [
34+
// ...
35+
Sherlockode\ConfigurationBundle\SherlockodeConfigurationBundle::class => ['all' => true],
36+
];
4037
```
4138

42-
You will need a Parameter entity in order to store the configuration values in the database.
39+
You will need a `Parameter` entity in order to store the configuration values in the database.
4340

4441
```php
4542
<?php
@@ -79,13 +76,15 @@ class Parameter extends BaseParameter
7976
The entity class you just created must be set in the bundle's configuration:
8077

8178
```yaml
79+
# config/packages/sherlockode_configuration.yaml
8280
sherlockode_configuration:
8381
entity_class:
8482
parameter: App\Entity\Parameter
8583
```
8684
8785
Now you are free to define any configuration entry you'd like by using the `parameters` key:
8886
```yaml
87+
# config/packages/sherlockode_configuration.yaml
8988
sherlockode_configuration:
9089
entity_class:
9190
parameter: App\Entity\Parameter
@@ -113,6 +112,7 @@ If you want to use translations you can define a `translation_domain` key global
113112
and use your translation key as the label.
114113

115114
```yaml
115+
# config/packages/sherlockode_configuration.yaml
116116
sherlockode_configuration:
117117
translation_domain: my_app_domain # default domain is false (no translation)
118118
parameters:
@@ -135,6 +135,7 @@ The other options are up to the field and its needs. For instance, the choice fi
135135
`multiple` and `choices` options in order to customize the form.
136136

137137
```yaml
138+
# config/packages/sherlockode_configuration.yaml
138139
sherlockode_configuration:
139140
parameters:
140141
guess_access:
@@ -164,6 +165,7 @@ sherlockode_configuration:
164165
You can also modify the default template used by this controller with the `templates` configuration entry point:
165166

166167
```yaml
168+
# config/packages/sherlockode_configuration.yaml
167169
sherlockode_configuration:
168170
templates:
169171
edit_form: 'Parameter/my_parameter_list.html.twig'
@@ -219,6 +221,7 @@ You can export or import parameters in a yaml file. You have two routes for thes
219221
You also can customize the import form template by defining your own in the configuration:
220222

221223
```yaml
224+
# config/packages/sherlockode_configuration.yaml
222225
sherlockode_configuration:
223226
templates:
224227
import_form: 'Parameter/my_import_form.html.twig'

0 commit comments

Comments
 (0)