Creates a new render controller instance.
string $entity_type: The entity type for this render controller.
\Drupal\Core\Entity\EntityRenderControllerInterface. A render controller instance.
public function getRenderController($entity_type) {
if (!isset($this->controllers['render'][$entity_type])) {
$class = $this
->getControllerClass($entity_type, 'render');
if (in_array('Drupal\\Core\\Entity\\EntityControllerInterface', class_implements($class))) {
$this->controllers['render'][$entity_type] = $class::createInstance($this->container, $this
->getDefinition($entity_type), $entity_type);
}
else {
$this->controllers['render'][$entity_type] = new $class($entity_type);
}
}
return $this->controllers['render'][$entity_type];
}