| @@ 62-75 (lines=14) @@ | ||
| 59 | * |
|
| 60 | * @internal param array $data |
|
| 61 | */ |
|
| 62 | public function __construct( |
|
| 63 | Template\Context $context, |
|
| 64 | TwoFactorSecret $twoFactorSecret, |
|
| 65 | Customer $customerGetter, |
|
| 66 | CustomerConfig $customerConfig, |
|
| 67 | GetQrCode $getQrCode, |
|
| 68 | array $data = [] |
|
| 69 | ) { |
|
| 70 | parent::__construct($context, $data); |
|
| 71 | $this->twoFactorSecret = $twoFactorSecret; |
|
| 72 | $this->customerGetter = $customerGetter; |
|
| 73 | $this->customerConfig = $customerConfig; |
|
| 74 | $this->getQrCode = $getQrCode; |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * A simple getter method to return the current customer |
|
| @@ 55-66 (lines=12) @@ | ||
| 52 | * @param CustomerConfig $customerConfig |
|
| 53 | * @param array $data |
|
| 54 | */ |
|
| 55 | public function __construct( |
|
| 56 | Context $context, |
|
| 57 | IsUsingTwoFactor $isUsingTwoFactor, |
|
| 58 | Customer $customerGetter, |
|
| 59 | CustomerConfig $customerConfig, |
|
| 60 | array $data = [] |
|
| 61 | ) { |
|
| 62 | parent::__construct($context, $data); |
|
| 63 | $this->isUsingTwoFactor = $isUsingTwoFactor; |
|
| 64 | $this->customerGetter = $customerGetter; |
|
| 65 | $this->customerConfig = $customerConfig; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * We only want to display the block if two factor has been enabled in the admin |
|
| @@ 70-82 (lines=13) @@ | ||
| 67 | * @param Fetcher $fetcher |
|
| 68 | * @param IsUsingTwoFactor $isUsingTwoFactor |
|
| 69 | */ |
|
| 70 | public function __construct( |
|
| 71 | Context $context, |
|
| 72 | CustomerAdmin $customerAdmin, |
|
| 73 | Customer $customerGetter, |
|
| 74 | Fetcher $fetcher, |
|
| 75 | IsUsingTwoFactor $isUsingTwoFactor |
|
| 76 | ) { |
|
| 77 | parent::__construct($context); |
|
| 78 | $this->customerAdmin = $customerAdmin; |
|
| 79 | $this->customerGetter = $customerGetter; |
|
| 80 | $this->isUsingTwoFactor = $isUsingTwoFactor; |
|
| 81 | $this->fetcher = $fetcher; |
|
| 82 | } |
|
| 83 | ||
| 84 | /** |
|
| 85 | * The controllers should only be run if the following conditions are met: |
|