You are here

public static function BlazyConfigEntityBase::loadWithFallback in Blazy 8.2

Load the optionset with a fallback.

File

src/Dejavu/BlazyConfigEntityBase.php, line 110

Class

BlazyConfigEntityBase
Defines the common configuration entity.

Namespace

Drupal\blazy\Dejavu

Code

public static function loadWithFallback($id) {
  $optionset = self::load($id);

  // Ensures deleted optionset while being used doesn't screw up.
  if (empty($optionset)) {
    $optionset = self::load('default');
  }
  return $optionset;
}