You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PointSaleSolver.php 978B

3 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839
  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. }