laminas-api-tools / api-tools-doctrine

Laminas API Tools Doctrine module
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
10 stars 21 forks source link

Altering Collection in EVENT_FETCH_ALL_POST #8

Open weierophinney opened 4 years ago

weierophinney commented 4 years ago

Hi, i left a comment in the Code Link

Shouldn't it be possible to alter the collection in the EVENT_FETCH_ALL_POST Event ? Only the EntityClass and the $data Variables are included in this Event. Where $data is just the parameter for the createQuery - Function. Is there a way to get the current collection from this - or was it a mistake to remove $collection from this event?

Greetings, Dwarfex


Originally posted by @Dwarfex at https://github.com/zfcampus/zf-apigility-doctrine/issues/272

weierophinney commented 4 years ago

I think all POST events should have the entity/collection and all PRE events should have the query builder.

These changes would be new development.


Originally posted by @TomHAnderson at https://github.com/zfcampus/zf-apigility-doctrine/issues/272#issuecomment-247231021