stephpy / timeline-bundle

Symfony2 bundle to make timeline
192 stars 57 forks source link

find out if action is hydrated #162

Closed smarques closed 9 years ago

smarques commented 10 years ago

Hi, what is the best way to check if an action has already been hydrated by the hydrate filter?

Thank you sergio

stephpy commented 10 years ago

Hi,

If you have option filter_unresolved:true, action is hydrated or removed from action collection. If not, you have to check manually for components. $action->getComponent('direct_complement')->getData().

smarques commented 10 years ago

great thanks. maybe

 $action->getComponent('direct_complement')!==null

would also be good?

Thank you!!

stephpy commented 10 years ago

component will never be null, his data could be. $action->getComponent('direct_complement')->getData()!==null

smarques commented 9 years ago

:+1: