*/ final readonly class ResourceKindRender implements ChillEntityRenderInterface { public function __construct(private TranslatableStringHelper $translatableStringHelper) {} public function renderBox($entity, array $options): string { return ''. $this->translatableStringHelper->localize( $entity->getTitle() ). ''; } public function renderString($entity, array $options): string { $title = ''; if (null !== $entity->getTitle()) { return $this->translatableStringHelper->localize($entity->getTitle()); } return $title; } public function supports($entity, array $options): bool { return $entity instanceof PersonResourceKind; } }