<?php
declare(strict_types=1);
namespace App\Application\Service\Menu;
use App\Application\Service\Session\SessionService;
use App\Manager\System\BrandLanguageManager;
use App\Manager\System\CustomerManager;
use App\Manager\System\LanguageManager;
use App\Application\Service\Helper\ControlPanelLinkGenerator;
use App\Application\Service\Helper\LegacyTranslator;
use App\Application\Service\Helper\LinkGenerator;
use App\Entity\System\Menu;
use App\Manager\System\PackManager;
use App\Manager\System\ProductManager;
use App\Manager\System\TagManager;
use App\Manager\System\TaxonomyLanguageManager;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Contracts\Translation\TranslatorInterface;
use App\Entity\System\Language;
class FooterService extends BaseMenuService
{
private MenuBaseHeaderService $menuBaseHeaderService;
private ParameterBagInterface $parameterBag;
private SessionService $sessionService;
public function __construct(
LegacyTranslator $legacyTranslator,
LinkGenerator $linkGenerator,
RequestStack $requestStack,
LanguageManager $languageManager,
TranslatorInterface $translator,
RouterInterface $router,
MenuBaseHeaderService $menuBaseHeaderService,
ControlPanelLinkGenerator $controlPanelLinkGenerator,
ParameterBagInterface $parameterBag,
Security $security,
SessionService $sessionService,
CustomerManager $customerManager,
PackManager $packManager,
BrandLanguageManager $brandLanguageManager,
TaxonomyLanguageManager $taxonomyLanguageManager,
TagManager $tagManager,
ProductManager $productManager
) {
$this->parameterBag = $parameterBag;
parent::__construct(
$legacyTranslator,
$linkGenerator,
$requestStack,
$languageManager,
$this->parameterBag,
$translator,
$router,
$controlPanelLinkGenerator,
$security,
$sessionService,
$customerManager,
$packManager,
$brandLanguageManager,
$taxonomyLanguageManager,
$tagManager,
$productManager
);
$this->menuBaseHeaderService = $menuBaseHeaderService;
$this->sessionService = $sessionService;
}
public function getSocialLinks(): array
{
return [
[
'icon' => '/public/img/icons/new-facebook.svg',
'url' => $this->parameterBag->get('facebook_url'),
'name' => 'facebook',
],
[
'icon' => '/public/img/icons/new-instagram.svg',
'url' => $this->parameterBag->get('instagram_url'),
'name' => 'instagram',
],
[
'icon' => '/public/img/icons/new-linkedin.svg',
'url' => $this->parameterBag->get('linkedin_url'),
'name' => 'linkedin',
],
[
'icon' => '/public/img/icons/new-youtube.svg',
'url' => $this->parameterBag->get('youtube_url'),
'name' => 'youtube',
],
[
'icon' => '/public/img/icons/new-twitter.svg',
'url' => $this->parameterBag->get('twitter_url'),
'name' => 'twitter',
],
[
'icon' => '/public/img/icons/new-pinterest.svg',
'url' => $this->parameterBag->get('pinterest_url'),
'name' => 'pinterest',
],
];
}
public function getAwards(): array
{
return [
[
'image' => '/public/img/new_camara.png',
'name' => '2023 - Innovation in the company',
],
[
'image' => '/public/img/landings/awards/mia-award.svg',
'name' => '2023 - International Marketing - Finalist',
],
[
'image' => '/public/img/landings/awards/ecommerce-tools-award.svg',
'name' => '2023 - Best Logistics and Internationalization',
],
[
'image' => '/public/img/landings/awards/ey-award.svg',
'name' => '2023 - Best Scale Up - Finalist',
],
[
'image' => '/public/img/marketplaces-awards.svg',
'name' => '2022 - Best Catalogue Solution',
],
[
'image' => '/public/img/marketplaces-awards.svg',
'name' => '2022 - Best Logistics Solution',
],
[
'image' => '/public/img/marketplaces-awards.svg',
'name' => '2022 - Best Manager',
],
[
'image' => '/public/img/new_camara.png',
'name' => '2022 - International',
],
[
'image' => '/public/img/aster-award.svg',
'name' => '2022 - Best Entrepreneurs',
],
[
'image' => '/public/img/onda-cero.svg',
'name' => '2021 - Best company',
],
[
'image' => '/public/img/new_insentive_awards.svg',
'name' => '2021 - Best Industry Service Provider',
],
[
'image' => '/public/img/new_cepyme.svg',
'name' => '2021 - Best Business Practices',
],
[
'image' => '/public/img/new_camara.png',
'name' => '2020 - Pyme del año',
],
[
'image' => '/public/img/new_cepyme.svg',
'name' => '2018 - Finalist Job Creation',
],
[
'image' => '/public/img/new_eawards.svg',
'name' => '2018 - Best Marketplace Technology',
],
[
'image' => '/public/img/new_ecommerce_awards.svg',
'name' => '2017 - Best B2B E-Commerce',
],
[
'image' => '/public/img/new_eawards.svg',
'name' => '2016 - Best International E-Commerce',
],
[
'image' => '/public/img/new_eawards.svg',
'name' => '2016 - Best Innovative E-Commerce',
],
[
'image' => '/public/img/new_paypal.svg',
'name' => '2015 - Best Innovative E-Commerce',
],
[
'image' => '/public/img/new_ecommerce_awards.svg',
'name' => '2015 - Best Cross Border',
],
];
}
/**
* @return array[]
*/
public function getBottomLinks(): array
{
return [
[
'name' => $this->legacyTranslator->trans('Formas de pago', 'sitemap'),
'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_PAYMENT_METHODS),
'external_link' => false,
'no_follow' => false,
],
[
'name' => $this->legacyTranslator->trans('Entrega y envío', 'sitemap'),
'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_SHIPMENT_AND_DELIVERY),
'external_link' => false,
'no_follow' => false,
],
[
'name' => $this->legacyTranslator->trans('Impuestos', 'sitemap'),
'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_TAXES),
'external_link' => false,
'no_follow' => false,
],
[
'name' => $this->legacyTranslator->trans('Garantía', 'sitemap'),
'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_WARRANTY),
'external_link' => false,
'no_follow' => false,
],
[
'name' => $this->translator->trans('footer.bottom_links.general_conditions'),
'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_GENERAL_PRIVACY_TERMS_AND_CONDITIONS),
'external_link' => false,
'no_follow' => false,
],
[
'name' => $this->translator->trans('footer.bottom_links.cookies', [], 'landings'),
'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_COOKIES),
'external_link' => false,
'no_follow' => false,
],
[
'name' => $this->translator->trans('footer.bottom_links.privacy_policy'),
'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_PRIVACY_POLICY),
'external_link' => false,
'no_follow' => false,
],
[
'name' => $this->translator->trans('footer.bottom_links.legal_notice'),
'url' => $this->linkGenerator->getCmsLink(CorporateMenuService::ID_CMS_LEGAL_NOTICE),
'external_link' => false,
'no_follow' => false,
],
[
'name' => $this->translator->trans('footer.bottom_links.responsible_business'),
'url' => $this->sessionService->getLocaleId() === Language::SPANISH_LANGUAGE_ID ?
'https://responsiblebusiness.bigbuy.eu/' : 'https://responsiblebusiness.bigbuy.eu/en_US/',
'external_link' => true,
'no_follow' => true,
],
];
}
/**
* @return array[]
*/
public function getCorporateLinks(): array
{
return $this->menuBaseHeaderService->createMenuGeneralByMenuId(Menu::FOOTER_ID, $this->requestStack->getSession()->get('lang'));
}
}