Creates a context definition from a given entity object.
\Drupal\Core\Entity\EntityInterface $entity: The entity from which to derive a context definition.
static
public static function fromEntity(EntityInterface $entity) { return static::fromEntityType($entity->getEntityType()); }