You are here

public function CreateNewRevision::getEntityTypeManager in Acquia Content Hub 8.2

Returns uncached entity type manager.

Using \Drupal::entityTypeManager() do to caching of the instance in some services. Looks like a core bug.

Return value

\Drupal\Core\Entity\EntityTypeManagerInterface The entity type manager.

File

src/EventSubscriber/PreEntitySave/CreateNewRevision.php, line 79

Class

CreateNewRevision
Prepares the entity for a new revision if it is configured to do so.

Namespace

Drupal\acquia_contenthub\EventSubscriber\PreEntitySave

Code

public function getEntityTypeManager() : EntityTypeManagerInterface {
  return \Drupal::entityTypeManager();
}