stephpy/timeline-bundle

find out if action is hydrated

Closed this issue · 4 comments

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

Thank you
sergio

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().

great thanks. maybe

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

would also be good?

Thank you!!

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

👍