You are here

public static function AutosaveEntityFormHandler::getAutosaveSessionID in Autosave Form 8

Returns the autosave session ID of the entity.

Return value

string|NULL The autosave session ID or NULL if it is not set.

Overrides AutosaveEntityFormHandlerInterface::getAutosaveSessionID

File

src/Form/AutosaveEntityFormHandler.php, line 303

Class

AutosaveEntityFormHandler
Base class for autosave form handlers.

Namespace

Drupal\autosave_form\Form

Code

public static function getAutosaveSessionID(EntityInterface $entity) {
  if (isset($entity->{static::AUTOSAVE_SESSION_ID})) {
    return $entity->{static::AUTOSAVE_SESSION_ID};
  }
  else {
    return NULL;
  }
}