You are here

function slick_optionset_exists in Slick Carousel 7.2

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

Checks whether an optionset with the given name already exists.

Parameters

string $optionset_name: The Optionset machine name.

Return value

bool Returns TRUE if exists, FALSE otherwise.

3 calls to slick_optionset_exists()
SlickTestCase::testOptionSetCrud in tests/slick.test
Tests Slick optionset CRUD.
SlickTestCase::testOptionSetForm in tests/slick.test
Tests Slick optionset form.
slick_optionset_save in includes/slick.admin.inc
Saves the given option set to the database.

File

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

Code

function slick_optionset_exists($optionset_name) {
  ctools_include('export');
  $optionset = ctools_export_crud_load('slick_optionset', $optionset_name);
  return isset($optionset->name);
}