I implemented this hook, together with the hook_ffc_conditions_info, etc.. in a custom module, but i noticed that my hook didn't get executed.
The problem is the following:
on line #97 of ffc.module, the fuction name is the following :
$callback = 'ffc_condition_execute_' . $condition['condition'];
if (function_exists($callback)) {
$callback($build, $field_name, !empty($condition['configuration']) ? $condition['configuration'] : '', $context);
}
and that's the only function which gets called, no module hooks get called as well.
Imo, there are two solutions: change the hook name to ffc_condition_execute_CONDITION like you did with ffc_condition_form_CONDITION
or make the hook work ;)
Comments
Comment #1
30equals commentedPatch for the second solution: make the hook work.
Comment #2
swentel commentedHmm, it's actually not a real hook indeed, it's an automatically generated callback function, both for form or conditions.
The reason why form callbacks now work in a different file is because the info file is loaded during the form alter anyway, execute callbacks need to live in the main module file - for now, and I'd rather let it be that way for now, although I agree it might be confusing. Let me sleep about it a little more :)
Comment #3
swentel commentedChanged the api file, it was confusing indeed.
Comment #4
swentel commentedCommitted and pushed (the bot might return red as I've pushed already).
Comment #5
swentel commented