Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
prepend field-type config for assignment and single selection
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Jun 28, 2018
1 parent 85baa65 commit 5e28cf0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions DependencyInjection/ExampleEventExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,27 @@ private function prependAdmin(ContainerBuilder $container)
$container->prependExtensionConfig(
'sulu_admin',
[
'field_type_options' => [
'selection' => [
'event_selection' => [
'adapter' => 'table',
'displayProperties' => ['title', 'startDate', 'endDate'],
'icon' => 'su-plus',
'label' => 'example_event.event',
'resourceKey' => 'events',
'overlayTitle' => 'example_event.events',
],
],
'single_selection' => [
'event_selection' => [
'auto_complete' => [
'displayProperty' => 'title',
'searchProperties' => ['title'],
'resourceKey' => 'events',
],
],
],
],
'resources' => [
'events' => [
'form' => ['@ExampleEventBundle/Resources/config/forms/Event.xml'],
Expand Down
1 change: 1 addition & 0 deletions Resources/translations/sulu/admin.de.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"example_event.events": "Veranstaltungen",
"example_event.event": "Veranstaltung",
"example_event.title": "Titel",
"example_event.start-date": "Start",
"example_event.end-date": "Ende",
Expand Down
1 change: 1 addition & 0 deletions Resources/translations/sulu/admin.en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"example_event.events": "Events",
"example_event.event": "Veranstaltung",
"example_event.title": "Title",
"example_event.start-date": "Start",
"example_event.end-date": "End",
Expand Down

0 comments on commit 5e28cf0

Please sign in to comment.