src/Application/Service/Menu/FooterService.php line 265

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Application\Service\Menu;
  4. use App\Application\Service\Session\SessionService;
  5. use App\Manager\System\BrandLanguageManager;
  6. use App\Manager\System\CustomerManager;
  7. use App\Manager\System\LanguageManager;
  8. use App\Application\Service\Helper\ControlPanelLinkGenerator;
  9. use App\Application\Service\Helper\LegacyTranslator;
  10. use App\Application\Service\Helper\LinkGenerator;
  11. use App\Entity\System\Menu;
  12. use App\Manager\System\PackManager;
  13. use App\Manager\System\ProductManager;
  14. use App\Manager\System\TagManager;
  15. use App\Manager\System\TaxonomyLanguageManager;
  16. use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
  17. use Symfony\Component\HttpFoundation\RequestStack;
  18. use Symfony\Component\Routing\RouterInterface;
  19. use Symfony\Component\Security\Core\Security;
  20. use Symfony\Contracts\Translation\TranslatorInterface;
  21. use App\Entity\System\Language;
  22. class FooterService extends BaseMenuService
  23. {
  24.     private MenuBaseHeaderService $menuBaseHeaderService;
  25.     private ParameterBagInterface $parameterBag;
  26.     private SessionService $sessionService;
  27.     public function __construct(
  28.         LegacyTranslator $legacyTranslator,
  29.         LinkGenerator $linkGenerator,
  30.         RequestStack $requestStack,
  31.         LanguageManager $languageManager,
  32.         TranslatorInterface $translator,
  33.         RouterInterface $router,
  34.         MenuBaseHeaderService $menuBaseHeaderService,
  35.         ControlPanelLinkGenerator $controlPanelLinkGenerator,
  36.         ParameterBagInterface $parameterBag,
  37.         Security $security,
  38.         SessionService $sessionService,
  39.         CustomerManager $customerManager,
  40.         PackManager $packManager,
  41.         BrandLanguageManager $brandLanguageManager,
  42.         TaxonomyLanguageManager $taxonomyLanguageManager,
  43.         TagManager $tagManager,
  44.         ProductManager $productManager
  45.     ) {
  46.         $this->parameterBag $parameterBag;
  47.         parent::__construct(
  48.             $legacyTranslator,
  49.             $linkGenerator,
  50.             $requestStack,
  51.             $languageManager,
  52.             $this->parameterBag,
  53.             $translator,
  54.             $router,
  55.             $controlPanelLinkGenerator,
  56.             $security,
  57.             $sessionService,
  58.             $customerManager,
  59.             $packManager,
  60.             $brandLanguageManager,
  61.             $taxonomyLanguageManager,
  62.             $tagManager,
  63.             $productManager
  64.         );
  65.         $this->menuBaseHeaderService $menuBaseHeaderService;
  66.         $this->sessionService $sessionService;
  67.     }
  68.     public function getSocialLinks(): array
  69.     {
  70.         return [
  71.             [
  72.                 'icon' => '/public/img/icons/new-facebook.svg',
  73.                 'url' => $this->parameterBag->get('facebook_url'),
  74.                 'name' => 'facebook',
  75.             ],
  76.             [
  77.                 'icon' => '/public/img/icons/new-instagram.svg',
  78.                 'url' => $this->parameterBag->get('instagram_url'),
  79.                 'name' => 'instagram',
  80.             ],
  81.             [
  82.                 'icon' => '/public/img/icons/new-linkedin.svg',
  83.                 'url' => $this->parameterBag->get('linkedin_url'),
  84.                 'name' => 'linkedin',
  85.             ],
  86.             [
  87.                 'icon' => '/public/img/icons/new-youtube.svg',
  88.                 'url' => $this->parameterBag->get('youtube_url'),
  89.                 'name' => 'youtube',
  90.             ],
  91.             [
  92.                 'icon' => '/public/img/icons/new-twitter.svg',
  93.                 'url' => $this->parameterBag->get('twitter_url'),
  94.                 'name' => 'twitter',
  95.             ],
  96.             [
  97.                 'icon' => '/public/img/icons/new-pinterest.svg',
  98.                 'url' => $this->parameterBag->get('pinterest_url'),
  99.                 'name' => 'pinterest',
  100.             ],
  101.         ];
  102.     }
  103.     public function getAwards(): array
  104.     {
  105.         return [
  106.             [
  107.                 'image' => '/public/img/new_camara.png',
  108.                 'name' => '2023 - Innovation in the company',
  109.             ],
  110.             [
  111.                 'image' => '/public/img/landings/awards/mia-award.svg',
  112.                 'name' => '2023 - International Marketing - Finalist',
  113.             ],
  114.             [
  115.                 'image' => '/public/img/landings/awards/ecommerce-tools-award.svg',
  116.                 'name' => '2023 - Best Logistics and Internationalization',
  117.             ],
  118.             [
  119.                 'image' => '/public/img/landings/awards/ey-award.svg',
  120.                 'name' => '2023 - Best Scale Up - Finalist',
  121.             ],
  122.             [
  123.                 'image' => '/public/img/marketplaces-awards.svg',
  124.                 'name' => '2022 - Best Catalogue Solution',
  125.             ],
  126.             [
  127.                 'image' => '/public/img/marketplaces-awards.svg',
  128.                 'name' => '2022 - Best Logistics Solution',
  129.             ],
  130.             [
  131.                 'image' => '/public/img/marketplaces-awards.svg',
  132.                 'name' => '2022 - Best Manager',
  133.             ],
  134.             [
  135.                 'image' => '/public/img/new_camara.png',
  136.                 'name' => '2022 - International',
  137.             ],
  138.             [
  139.                 'image' => '/public/img/aster-award.svg',
  140.                 'name' => '2022 - Best Entrepreneurs',
  141.             ],
  142.             [
  143.                 'image' => '/public/img/onda-cero.svg',
  144.                 'name' => '2021 - Best company',
  145.             ],
  146.             [
  147.                 'image' => '/public/img/new_insentive_awards.svg',
  148.                 'name' => '2021 - Best Industry Service Provider',
  149.             ],
  150.             [
  151.                 'image' => '/public/img/new_cepyme.svg',
  152.                 'name' => '2021 - Best Business Practices',
  153.             ],
  154.             [
  155.                 'image' => '/public/img/new_camara.png',
  156.                 'name' => '2020 - Pyme del año',
  157.             ],
  158.             [
  159.                 'image' => '/public/img/new_cepyme.svg',
  160.                 'name' => '2018 - Finalist Job Creation',
  161.             ],
  162.             [
  163.                 'image' => '/public/img/new_eawards.svg',
  164.                 'name' => '2018 - Best Marketplace Technology',
  165.             ],
  166.             [
  167.                 'image' => '/public/img/new_ecommerce_awards.svg',
  168.                 'name' => '2017 - Best B2B E-Commerce',
  169.             ],
  170.             [
  171.                 'image' => '/public/img/new_eawards.svg',
  172.                 'name' => '2016 - Best International E-Commerce',
  173.             ],
  174.             [
  175.                 'image' => '/public/img/new_eawards.svg',
  176.                 'name' => '2016 - Best Innovative E-Commerce',
  177.             ],
  178.             [
  179.                 'image' => '/public/img/new_paypal.svg',
  180.                 'name' => '2015 - Best Innovative E-Commerce',
  181.             ],
  182.             [
  183.                 'image' => '/public/img/new_ecommerce_awards.svg',
  184.                 'name' => '2015 - Best Cross Border',
  185.             ],
  186.         ];
  187.     }
  188.     /**
  189.      * @return array[]
  190.      */
  191.     public function getBottomLinks(): array
  192.     {
  193.         return [
  194.             [
  195.                 'name' => $this->legacyTranslator->trans('Formas de pago''sitemap'),
  196.                 'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_PAYMENT_METHODS),
  197.                 'external_link' => false,
  198.                 'no_follow' => false,
  199.             ],
  200.             [
  201.                 'name' => $this->legacyTranslator->trans('Entrega y envío''sitemap'),
  202.                 'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_SHIPMENT_AND_DELIVERY),
  203.                 'external_link' => false,
  204.                 'no_follow' => false,
  205.             ],
  206.             [
  207.                 'name' => $this->legacyTranslator->trans('Impuestos''sitemap'),
  208.                 'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_TAXES),
  209.                 'external_link' => false,
  210.                 'no_follow' => false,
  211.             ],
  212.             [
  213.                 'name' => $this->legacyTranslator->trans('Garantía''sitemap'),
  214.                 'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_WARRANTY),
  215.                 'external_link' => false,
  216.                 'no_follow' => false,
  217.             ],
  218.             [
  219.                 'name' => $this->translator->trans('footer.bottom_links.general_conditions'),
  220.                 'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_GENERAL_PRIVACY_TERMS_AND_CONDITIONS),
  221.                 'external_link' => false,
  222.                 'no_follow' => false,
  223.             ],
  224.             [
  225.                 'name' => $this->translator->trans('footer.bottom_links.cookies', [], 'landings'),
  226.                 'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_COOKIES),
  227.                 'external_link' => false,
  228.                 'no_follow' => false,
  229.             ],
  230.             [
  231.                 'name' => $this->translator->trans('footer.bottom_links.privacy_policy'),
  232.                 'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_PRIVACY_POLICY),
  233.                 'external_link' => false,
  234.                 'no_follow' => false,
  235.             ],
  236.             [
  237.                 'name' => $this->translator->trans('footer.bottom_links.legal_notice'),
  238.                 'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_LEGAL_NOTICE),
  239.                 'external_link' => false,
  240.                 'no_follow' => false,
  241.             ],
  242.             [
  243.                 'name' => $this->translator->trans('footer.bottom_links.responsible_business'),
  244.                 'url' => $this->sessionService->getLocaleId() === Language::SPANISH_LANGUAGE_ID ?
  245.                     'https://responsiblebusiness.bigbuy.eu/' 'https://responsiblebusiness.bigbuy.eu/en_US/',
  246.                 'external_link' => true,
  247.                 'no_follow' => true,
  248.             ],
  249.         ];
  250.     }
  251.     /**
  252.      * @return array[]
  253.      */
  254.     public function getCorporateLinks(): array
  255.     {
  256.         return $this->menuBaseHeaderService->createMenuGeneralByMenuId(Menu::FOOTER_ID$this->requestStack->getSession()->get('lang'));
  257.     }
  258. }