-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed an issue when custom actions override default actions without d…
…efining all their options
- Loading branch information
1 parent
c76aaab
commit 0e78935
Showing
10 changed files
with
425 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Tests/DependencyInjection/fixtures/configurations/input/admin_101.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# TEST | ||
# when the user defines an action with the same name of a default action, he/she | ||
# is actually overriding the default options of that action. Therefore, if the | ||
# custom configuration doesn't provide a value for some option (e.g. the icon or | ||
# the label) the default value should be applied to avoid template issues | ||
# this test checks that the above is correct when using global actions | ||
|
||
# CONFIGURATION | ||
easy_admin: | ||
edit: | ||
actions: ['delete', 'list'] | ||
show: | ||
actions: ['edit'] | ||
entities: | ||
TestEntity: | ||
class: AppBundle\Entity\TestEntity |
16 changes: 16 additions & 0 deletions
16
Tests/DependencyInjection/fixtures/configurations/input/admin_102.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# TEST | ||
# when the user defines an action with the same name of a default action, he/she | ||
# is actually overriding the default options of that action. Therefore, if the | ||
# custom configuration doesn't provide a value for some option (e.g. the icon or | ||
# the label) the default value should be applied to avoid template issues | ||
# this test checks that the above is correct when using entity actions | ||
|
||
# CONFIGURATION | ||
easy_admin: | ||
entities: | ||
TestEntity: | ||
class: AppBundle\Entity\TestEntity | ||
edit: | ||
actions: ['delete', 'list'] | ||
show: | ||
actions: ['edit'] |
20 changes: 20 additions & 0 deletions
20
Tests/DependencyInjection/fixtures/configurations/input/admin_103.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# TEST | ||
# when the user defines an action with the same name of a default action, he/she | ||
# is actually overriding the default options of that action. Therefore, if the | ||
# custom configuration doesn't provide a value for some option (e.g. the icon or | ||
# the label) the default value should be applied to avoid template issues | ||
# this test checks that the above is correct when using both global and entity actions | ||
|
||
# CONFIGURATION | ||
easy_admin: | ||
edit: | ||
actions: ['delete', 'list'] | ||
show: | ||
actions: ['edit'] | ||
entities: | ||
TestEntity: | ||
class: AppBundle\Entity\TestEntity | ||
edit: | ||
actions: ['delete', 'list'] | ||
show: | ||
actions: ['edit'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
Tests/DependencyInjection/fixtures/configurations/output/config_101.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
easy_admin: | ||
edit: | ||
actions: | ||
- delete | ||
- list | ||
show: | ||
actions: | ||
- edit | ||
entities: | ||
TestEntity: | ||
class: AppBundle\Entity\TestEntity | ||
label: TestEntity | ||
name: TestEntity | ||
edit: | ||
fields: { } | ||
actions: | ||
delete: | ||
name: delete | ||
type: method | ||
label: action.delete | ||
class: '' | ||
icon: trash | ||
list: | ||
name: list | ||
type: method | ||
label: action.list | ||
class: '' | ||
icon: null | ||
list: | ||
fields: { } | ||
actions: | ||
show: | ||
name: show | ||
type: method | ||
label: action.show | ||
class: '' | ||
icon: null | ||
edit: | ||
name: edit | ||
type: method | ||
label: action.edit | ||
class: '' | ||
icon: null | ||
search: | ||
name: search | ||
type: method | ||
label: action.search | ||
class: '' | ||
icon: null | ||
new: | ||
name: new | ||
type: method | ||
label: action.new | ||
class: '' | ||
icon: null | ||
list: | ||
name: list | ||
type: method | ||
label: action.list | ||
class: '' | ||
icon: null | ||
new: | ||
fields: { } | ||
actions: | ||
list: | ||
name: list | ||
type: method | ||
label: action.list | ||
class: '' | ||
icon: null | ||
show: | ||
fields: { } | ||
actions: | ||
delete: | ||
name: delete | ||
type: method | ||
label: action.delete | ||
class: '' | ||
icon: trash | ||
list: | ||
name: list | ||
type: method | ||
label: action.list | ||
class: '' | ||
icon: null | ||
edit: | ||
name: edit | ||
type: method | ||
label: action.edit | ||
class: '' | ||
icon: edit | ||
design: | ||
assets: | ||
css: { } | ||
js: { } | ||
theme: default | ||
color_scheme: dark | ||
brand_color: '#E67E22' | ||
form_theme: | ||
- '@EasyAdmin/form/bootstrap_3_horizontal_layout.html.twig' | ||
site_name: 'Easy Admin' | ||
formats: | ||
date: Y-m-d | ||
time: 'H:i:s' | ||
datetime: 'F j, Y H:i' | ||
list: | ||
actions: { } | ||
max_results: 15 | ||
new: | ||
actions: { } |
Oops, something went wrong.