Skip to content

Commit

Permalink
Merge 4.x into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored Oct 24, 2023
2 parents c19d795 + e9bdc31 commit 78be16c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.14.0](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/compare/4.13.0...4.14.0) - 2023-10-23
### Added
- [[#1768](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1768)] Guessing for enum types ([@phansys](https://github.com/phansys))

## [4.13.0](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/compare/4.12.0...4.13.0) - 2023-05-13
### Added
- [[#1755](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1755)] Support for `sonata-project/form-extensions` 2.0 ([@jordisala1991](https://github.com/jordisala1991))
Expand Down
7 changes: 4 additions & 3 deletions docs/reference/data_source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
Export / DataSource
===================

When using an admins export feature you might want to modify how dates and times are exported.
This is done by calling ``setDateTimeFormat`` on the data source iterator.
When using an admins export feature you might want to modify how values, such as dates, times and enumerations are exported.
This is done by calling convenience methods like ``setDateTimeFormat()`` and ``useBackedEnumValue()`` on the data source iterator.

Here's one way to do it:

1. Decorate the default Sonata\DoctrineORMAdminBundle\Exporter\DataSource with your own and call ``setDateTimeFormat`` there.::
1. Decorate the default Sonata\DoctrineORMAdminBundle\Exporter\DataSource with your own and calls there.::

namespace App\Service\Admin;

Expand All @@ -34,6 +34,7 @@ Here's one way to do it:
$iterator = $this->dataSource->createIterator($query, $fields);

$iterator->setDateTimeFormat('Y-m-d H:i:s');
$iterator->useBackedEnumValue(false);

return $iterator;
}
Expand Down

0 comments on commit 78be16c

Please sign in to comment.