You are here

function slick_optionset_load_all in Slick Carousel 7.2

Same name and namespace in other branches
  1. 7.3 includes/slick.admin.inc \slick_optionset_load_all()

Fetches all optionsets from the storage.

Parameters

bool $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

array The associative array of all optionsets.

4 calls to slick_optionset_load_all()
SlickTestCase::testOptionSetCrud in tests/slick.test
Tests Slick optionset CRUD.
slick_optionset_options in includes/slick.admin.inc
Load all slick optionsets as select options.
slick_update_7007 in ./slick.install
Typecast old optionset values (pre-alpha -- 2015-03-31).
slick_update_7008 in ./slick.install
Removed HTML tags from arrows due to translation issue as per #3075838.

File

includes/slick.admin.inc, line 163
Contains optional functions called only if needed by admin pages.

Code

function slick_optionset_load_all($reset = FALSE) {
  ctools_include('export');
  $optionsets = ctools_export_crud_load_all('slick_optionset', $reset);
  foreach ($optionsets as $optionset) {

    // Ensures the optionset is typecast after being loaded from storage.
    $breakpoints = isset($optionset->breakpoints) ? $optionset->breakpoints : NULL;
    _slick_typecast_optionset($optionset->options, $breakpoints);
  }
  return $optionsets;
}