You are here

function ctools_export_crud_load_all in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 includes/export.inc \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

7 calls to ctools_export_crud_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.
ctools_export_ui::list_page in plugins/export_ui/ctools_export_ui.class.php
Master entry point for handling a list.

... See full list

File

includes/export.inc, line 102
Contains code to make it easier to have exportable objects.

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');
  }
}