protected function determineEntityTypeId($class,
$context) { // Get the entity type ID while letting context override the $class param.
return !
empty($context['entity_type'
]) ?
$context['entity_type'
] :
$this->
getEntityTypeRepository()->
getEntityTypeFromClass($class);
} /**
* Gets the entity type definition.
*
* @param string $entity_type_id
* The entity type ID to load the definition for.
*
* @return \Drupal\Core\Entity\EntityTypeInterface
* The loaded entity type definition.
*
* @throws \Symfony\Component\Serializer\Exception\UnexpectedValueException
*/