1
- #Advanced configuration
1
+ # Advanced configuration
2
2
3
3
To adapt the admin to your needs some extension points have been created. These, allow reusability and
4
4
ease of use to create scalable and flexible admin panels.
@@ -54,7 +54,8 @@ lin3s_admin:
54
54
55
55
As you have noticed, different concepts such as actions, fields, filters and global actions show up. The configuration
56
56
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.
58
59
59
60
Bellow the FQCN, you can find the ** actions** . These define the manipulations that can be performed to our entity, the
60
61
` 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
71
72
72
73
** List fields**
73
74
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
+
74
90
** List filters**
75
91
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
+
76
105
** 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