Skip to content

Commit

Permalink
Add created date to list view (#131)
Browse files Browse the repository at this point in the history
* add created date to list view

* disable const seperation
  • Loading branch information
alexander-schranz authored Dec 11, 2017
1 parent 87fa1e9 commit 07fe4c6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .styleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ disabled:
- blankline_after_open_tag
- function_declaration
- single_line_class_definition

- const_separation
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 1.0.0-RC2

- ENHANCEMENT #131 Add created date to list view
- BUGFIX #130 Fixed csv export for big results
- FEATURE #129 Add disabled field type configuration

Expand Down
29 changes: 29 additions & 0 deletions Controller/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,35 @@ public function getFieldDescriptors($locale, $filters)
false
);

$fieldDescriptors['created'] = new DoctrineCaseFieldDescriptor(
'created',
new DoctrineDescriptor(
'translation',
'created',
[
'translation' => new DoctrineJoinDescriptor(
'translation',
Form::class . '.translations',
sprintf('translation.locale = \'%s\'', $locale)
),
]
),
new DoctrineDescriptor(
'defaultTranslation',
'created',
[
'defaultTranslation' => new DoctrineJoinDescriptor(
'defaultTranslation',
Form::class . '.translations',
sprintf('defaultTranslation.locale = %s.defaultLocale', Form::class)
),
]
),
'public.created',
false,
false
);

return $fieldDescriptors;
}

Expand Down

0 comments on commit 07fe4c6

Please sign in to comment.