[Flow] Validation > Exception instead of going back to newAction
Alexander Berl
a.berl at outlook.com
Wed Dec 11 10:37:22 CET 2013
You need access to the doctrine entity manager to get the connection.
However, the entity manager is capsulated inside the flow persistence
manager and not publically getable.
The optimal solution would be to add some custom doctrine type
configuration within TYPO3.Flow.persistence.doctrine.* and then use that
configuration within
TYPO3\Flow\Persistence\Doctrine\EntityManagerFactory to setup the
doctrine types from configuration.
That would even be worth a changeset to contribute to flow.
As a rough sample how such a configurable doctrine setup could look, you
can refer to my changeset that allows configuration of doctrine event
listeners/subscribers:
https://review.typo3.org/#/c/19984/6
Regards,
Alexander
Am 10.12.2013 16:10, schrieb Axel Wüstemann:
> Am 09.12.2013 11:11, schrieb Alexander Berl:
>> maybe you can go a little different way about the core problem with
>> the NLS:
>> create your own Doctrine Type that formats the DateTime correctly,
>> similar to how timezone is handled here:
>> http://docs.doctrine-project.org/en/2.0.x/cookbook/working-with-datetime.html
>>
>
>
> Now I'm wondering how register my DateTime to Flow/Doctrine?
>
> http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html
>
>
> Type::addType('money', 'My\Project\Types\MoneyType');
> $conn->getDatabasePlatform()->registerDoctrineTypeMapping('MyMoney',
> 'money');
>
> Where to put this in the Flow environment?
More information about the Flow
mailing list