What is the difference between ctools_export_crud_load/ctools_export_crud_load_all and ctools_export_load_object and under what use case should one use one or the other?



Load a single exportable object.


Load all exportable objects of a given type.


Load some number of exportable objects.

The first two are just shortcut functions to ctools_export_load_object() (with a bit of setup logic) ctools_export_load_object() is a more complicated function that can filter the required exportables by various criteria. The main point of interest as I can see it is that the first two accept a $reset parameter to reset the exportable(s)'s caches, whereas ctools_export_load_object() doesn't accept that parameter.

Basically, I'd say if the exportables you need to load can't be queried by using ctools_export_crud_load() or ctools_export_crud_load_all(), then use ctools_export_load_object(). Otherwise use one of the former functions, as they handle some of the necessary setup for you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.