Renders fields of a given entity with a given display.
\Drupal\Core\Entity\EntityInterface $entity: The entity object with attached fields to render.
\Drupal\entity\Plugin\Core\Entity\EntityDisplay $display: The display to render the fields in.
protected function renderEntityFields(EntityInterface $entity, EntityDisplay $display) {
$content = field_attach_view($entity, $display);
$this->content = drupal_render($content);
return $this->content;
}