find out if action is hydrated
Closed this issue · 4 comments
smarques commented
Hi, what is the best way to check if an action has already been hydrated by the hydrate filter?
Thank you
sergio
stephpy commented
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
great thanks. maybe
$action->getComponent('direct_complement')!==null
would also be good?
Thank you!!
stephpy commented
component will never be null, his data could be. $action->getComponent('direct_complement')->getData()!==null
smarques commented
👍