<?php
namespace App\Service;
use App\Repository\SEORepository;
use App\Repository\ProfileRepository;
use App\Repository\AboutInfoRepository;
use App\Repository\GalleryImageRepository;
/**
* Permet de recupérer les données permanantes du site web (données pour header/footer/...)
*/
class StaticData
{
public function __construct(SEORepository $seoRepo,AboutInfoRepository $aboutRepo,ProfileRepository $profileRepo)
{
$this->seoRepo = $seoRepo;
$this->aboutRepo = $aboutRepo;
$this->profileRepo = $profileRepo;
}
public function getStaticData()
{
$data['seo'] = $this->seoRepo->findOneBy([]);
$data['about'] = $this->aboutRepo->findOneBy([]);
$data['profile'] = $this->profileRepo->findOneBy([]);
return compact('data');
}
}