public static function PurgerSettingsBase::load in Purge 8.3
Loads an entity.
Parameters
mixed $id: The id of the entity to load.
Return value
static|null The entity object or NULL if there is no entity with the given ID.
Overrides EntityBase::load
File
- src/
Plugin/ Purge/ Purger/ PurgerSettingsBase.php, line 22
Class
- PurgerSettingsBase
- Provides an interface for purgers storing settings through config entities.
Namespace
Drupal\purge\Plugin\Purge\PurgerCode
public static function load($id) {
if (!($settings = parent::load($id))) {
$settings = self::create([
'id' => $id,
]);
}
return $settings;
}