You are here

public static function SlickBase::load in Slick Carousel 7.3

Returns the given optionset object identified by $id.

Parameters

string $id: The optionset ID with property name, or default.

Return value

object Returns the optionset, or else default, if no optionset found.

Overrides SlickBaseInterface::load

1 call to SlickBase::load()
SlickBase::loadWithFallback in src/Entity/SlickBase.php
Load the optionset with a fallback.

File

src/Entity/SlickBase.php, line 64

Class

SlickBase
Defines the Slick configuration entity.

Namespace

Drupal\slick\Entity

Code

public static function load($id = 'default') {
  ctools_include('export');
  $optionset = ctools_export_crud_load(static::TABLE, $id);

  // Ensures deleted optionset while being used doesn't screw up.
  if (!isset($optionset->name)) {
    $optionset = ctools_export_crud_load(static::TABLE, 'default');
  }
  return $optionset;
}