JEMBOT MAWOT Bypass Shell

Current Path : /home/cinepatreb/billetterie/modules/mollie/subscription/Form/Options/
Upload File :
Current File : /home/cinepatreb/billetterie/modules/mollie/subscription/Form/Options/SubscriptionOptionsType.php

<?php
/**
 * Mollie       https://www.mollie.nl
 *
 * @author      Mollie B.V. <info@mollie.nl>
 * @copyright   Mollie B.V.
 * @license     https://github.com/mollie/PrestaShop/blob/master/LICENSE.md
 *
 * @see        https://github.com/mollie/PrestaShop
 * @codingStandardsIgnoreStart
 */

namespace Mollie\Subscription\Form\Options;

use Module;
use PrestaShop\PrestaShop\Core\Form\FormChoiceProviderInterface;
use PrestaShopBundle\Form\Admin\Type\SwitchType;
use PrestaShopBundle\Form\Admin\Type\TranslatorAwareType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Translation\TranslatorInterface;

if (!defined('_PS_VERSION_')) {
    exit;
}

class SubscriptionOptionsType extends TranslatorAwareType
{
    /** @var FormChoiceProviderInterface */
    private $carrierOptionProvider;
    /** @var Module */
    private $module;

    public function __construct(
        TranslatorInterface $translator,
        array $locales,
        FormChoiceProviderInterface $carrierOptionProvider,
        Module $module
    ) {
        parent::__construct($translator, $locales);

        $this->carrierOptionProvider = $carrierOptionProvider;
        $this->module = $module;
    }

    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder
            ->add('enable_subscriptions', SwitchType::class, [
                'required' => true,
            ])
            ->add('carrier', ChoiceType::class, [
                'required' => true,
                'choices' => $this->carrierOptionProvider->getChoices(),
                // TODO migrate to modern translation system
                'placeholder' => $this->module->l('Choose your carrier'),
            ]);
    }
}

xxxxx1.0, XXX xxxx