Skip to content

Commit b0b706c

Browse files
Finished advanced configuration doc and added some features to the README
1 parent 55cd334 commit b0b706c

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313

1414
## Features
1515

16+
* No need to touch your existing entities, domain models or symfony forms
17+
* Configuration driven admin panel, with customizable actions, lists, filters and pagination.
1618
* Extensible with already available CRUD and DDD extensions.
17-
* Fully customizable actions, lists, filters and pagination.
1819
* Responsive admin panel theme.
1920

2021
[Show me the docs!](docs/index.md)

docs/advanced_configuration.md

+38-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Advanced configuration
1+
# Advanced configuration
22

33
To adapt the admin to your needs some extension points have been created. These, allow reusability and
44
ease of use to create scalable and flexible admin panels.
@@ -54,7 +54,8 @@ lin3s_admin:
5454

5555
As you have noticed, different concepts such as actions, fields, filters and global actions show up. The configuration
5656
above defines how our admin panel should behave for our `Page` entity. This has been defined under
57-
`lin3s_admin.entities.pages.class` using our fully qualified class name (FQCN).
57+
`lin3s_admin.entities.pages.class` using our fully qualified class name (FQCN). Multiple entities can be defined using
58+
`lin3s_admin.entities` as a key value array.
5859

5960
Bellow the FQCN, you can find the **actions**. These define the manipulations that can be performed to our entity, the
6061
`Page`. Each action will require three values:
@@ -71,6 +72,41 @@ Each entity will have a list containing all the data related to the target entit
7172

7273
**List fields**
7374

75+
List fields array (`lin3s_admin.entities.pages.list.field` in the example above) holds all columns that need to be shown
76+
in the pages entity list. Each column can be rendered in a diferent way using a different **type** and can have a **name**
77+
that will be used as table header of that column. Therefore each list field entry will have the following options:
78+
79+
* The **name**, a string that will be translated and shown as table header of the current column.
80+
* The **type**, is a reusable column type that will render the content accordingly. AdminBundle has some
81+
[built-in list fields](available_extensions.md) or you can [create a new one](custom_list_field.md).
82+
In the example above we are using built-in
83+
[string](https://github.com/LIN3S/AdminBundle/blob/master/src/LIN3S/AdminBundle/Extension/ListField/StringListFieldType.php)
84+
and
85+
[actions](https://github.com/LIN3S/AdminBundle/blob/master/src/LIN3S/AdminBundle/Extension/ListField/ActionsListFieldType.php)
86+
field types.
87+
* The **options** fields is an array that holds different values for each list field type. Check the reference of each
88+
list field for further info
89+
7490
**List filters**
7591

92+
List filters array (`lin3s_admin.entities.pages.list.filters` in the example above) holds all filters that can be selected
93+
in the pages entity list. Each filter will render a custom form input for each use case and will be placed in a dropdown
94+
list over the table. Each list filter entry will have the following obtions
95+
96+
* The **name**, a string that will be translated and shown in the dropdown filter menu.
97+
* The **type**, selects a reusable filter type. AdminBundle has some
98+
[built-in list filters](available_extensions.md) or you can [create a new one](custom_list_filter.md).
99+
In the example above we are using built-in
100+
[text](https://github.com/LIN3S/AdminBundle/blob/master/src/LIN3S/AdminBundle/Extension/ListFilter/TextListFilterType.php)
101+
filter.
102+
* The **options** fields is an array that holds different values for each list filter type. Check the reference of each
103+
list filter for further info
104+
76105
**Global actions**
106+
107+
Global actions are just a reference to the existing actions of our target entity. This array sets a multiple actions
108+
that will be added to the top right side of the list page. Useful when you need for example a "New" button that isn`t
109+
related directly to one entity entry.
110+
111+
To use it just add the name of the action you want to add to the `lin3s_admin.entities.<your-entity>.list.global_actions`
112+
array.

0 commit comments

Comments
 (0)