function ctools_export_crud_load_all

Load all exportable objects of a given type.

Parameters

$table: The name of the table to use to retrieve $schema values. This table must have an 'export' section containing data or this function will fail.

$reset: If TRUE, the static cache of all objects will be flushed prior to loading all. This can be important on listing pages where items might have changed on the page load.

Return value

An array of all loaded objects, keyed by the unique IDs of the export key.

Related topics

9 calls to ctools_export_crud_load_all()
CtoolsExportCrudTestCase::testCrudExportLoadAll in tests/ctools_export_test/ctools_export.test
Tests CRUD operation: Load all.
ctools_access_ruleset_panels_dashboard_blocks in ctools_access_ruleset/ctools_access_ruleset.module
Implementation of hook_panels_dashboard_blocks().
ctools_custom_content_panels_dashboard_blocks in ctools_custom_content/ctools_custom_content.module
Implementation of hook_panels_dashboard_blocks().
ctools_custom_content_type_content_types in plugins/content_types/custom/custom.inc
Return all custom content types available.
ctools_export_default_list in includes/export.inc
Default function for listing bulk exportable objects.

... See full list

File

includes/export.inc, line 133

Code

function ctools_export_crud_load_all($table, $reset = FALSE) {
    $schema = ctools_export_get_schema($table);
    if (empty($schema['export'])) {
        return array();
    }
    $export = $schema['export'];
    if ($reset) {
        ctools_export_load_object_reset($table);
    }
    if (!empty($export['load all callback']) && function_exists($export['load all callback'])) {
        return $export['load all callback']($reset);
    }
    else {
        return ctools_export_load_object($table, 'all');
    }
}