diff --git a/src/Controller/CustomerAppAPI/ServiceController.php b/src/Controller/CustomerAppAPI/ServiceController.php index 3d4eeaa3..5e8abfdb 100644 --- a/src/Controller/CustomerAppAPI/ServiceController.php +++ b/src/Controller/CustomerAppAPI/ServiceController.php @@ -5,6 +5,8 @@ namespace App\Controller\CustomerAppAPI; use Symfony\Component\HttpFoundation\Request; use Catalyst\ApiBundle\Component\Response as ApiResponse; +use App\Entity\Service; + class ServiceController extends ApiController { public function listServices(Request $req) @@ -45,6 +47,7 @@ class ServiceController extends ApiController $services[] = [ 'id' => $result->getID(), 'name' => $result->getName(), + 'icon' => $result->getIcon(), // 'partners' => $partners, ]; } diff --git a/src/Entity/Service.php b/src/Entity/Service.php index e24cd672..cd373964 100644 --- a/src/Entity/Service.php +++ b/src/Entity/Service.php @@ -28,6 +28,12 @@ class Service */ protected $name; + // icon used by service on app + /** + * @ORM\Column(type="string", length=80, nullable=true) + */ + protected $icon; + // link to partners with this service /** * @ORM\ManyToMany(targetEntity="Partner", mappedBy="services", fetch="EXTRA_LAZY") @@ -55,6 +61,17 @@ class Service return $this->name; } + public function setIcon($icon) + { + $this->icon = $icon; + return $this; + } + + public function getIcon() + { + return $this->icon; + } + public function addPartner(Partner $partner) { $this->partners[$partner->getID()] = $partner;