translatableStringHelper = $translatableStringHelper; } public function renderBox($entity, array $options): string { return $this->getDefaultOpeningBox('activity-reason') . '' . ' ' . '' . $this->translatableStringHelper->localize( $entity->getCategory()->getName() ) . '' . ' > ' . '' . $this->translatableStringHelper->localize( $entity->getName() ) . '' . '' . $this->getDefaultClosingBox(); } /** * @param ActivityReason $entity */ public function renderString($entity, array $options): string { $category = ''; if (null !== $entity->getCategory()) { $category = $this->translatableStringHelper->localize( $entity->getCategory()->getName() ) . ' > '; } return $category . $this->translatableStringHelper->localize( $entity->getName() ); } public function supports($entity, array $options): bool { return $entity instanceof ActivityReason; } }