Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

39 lines
978B

  1. <?php
  2. namespace Lc\CaracoleBundle\Solver\PointSale;
  3. use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface;
  4. class PointSaleSolver
  5. {
  6. public function labelAdminChoice(PointSaleInterface $pointSale): string
  7. {
  8. if ($pointSale->getIsPublic()) {
  9. return '[Public] ' . $pointSale->getTitle();
  10. } else {
  11. return '[Privée] ' . $pointSale->getTitle();
  12. }
  13. }
  14. public function getSummary(PointSaleInterface $pointSale): string
  15. {
  16. $html = '';
  17. if ($pointSale->getTitle()) {
  18. $html .= $pointSale->getTitle() . '<br />';
  19. }
  20. if ($pointSale->getAddress()) {
  21. $html .= $pointSale->getAddress()->getAddress() . '<br />';
  22. }
  23. if ($pointSale->getAddress()->getZip() || $pointSale->getAddress()->getCity()) {
  24. $html .= $pointSale->getAddress()->getZip() . ' ' . $pointSale->getAddress()->getCity() . '<br />';
  25. }
  26. return $html;
  27. }
  28. }