|
7 | 7 |
|
8 | 8 | namespace Magento\Customer\Controller\Adminhtml\Customer;
|
9 | 9 |
|
| 10 | +use Magento\Integration\Api\CustomerTokenServiceInterface; |
| 11 | +use Magento\Customer\Api\AccountManagementInterface; |
| 12 | +use Magento\Customer\Api\AddressRepositoryInterface; |
| 13 | +use Magento\Customer\Api\CustomerRepositoryInterface; |
| 14 | +use Magento\Customer\Api\Data\AddressInterfaceFactory; |
| 15 | +use Magento\Customer\Api\Data\CustomerInterfaceFactory; |
| 16 | +use Magento\Customer\Model\Address\Mapper; |
| 17 | +use Magento\Framework\ObjectFactory; |
| 18 | +use Magento\Framework\Api\DataObjectHelper; |
| 19 | + |
10 | 20 | /**
|
11 |
| - * Class to invalidate tokens for customers |
| 21 | + * Class to invalidate tokens for customers |
| 22 | + * |
| 23 | + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) |
| 24 | + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) |
| 25 | + * @SuppressWarnings(PHPMD.TooManyFields) |
| 26 | + * @SuppressWarnings(PHPMD.NumberOfChildren) |
12 | 27 | */
|
13 | 28 | class InvalidateToken extends \Magento\Customer\Controller\Adminhtml\Index
|
14 | 29 | {
|
| 30 | + /** |
| 31 | + * @var CustomerTokenServiceInterface |
| 32 | + */ |
| 33 | + protected $tokenService; |
| 34 | + |
| 35 | + /** |
| 36 | + * @param CustomerTokenServiceInterface $tokenService |
| 37 | + * @param \Magento\Backend\App\Action\Context $context |
| 38 | + * @param \Magento\Framework\Registry $coreRegistry |
| 39 | + * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory |
| 40 | + * @param \Magento\Customer\Model\CustomerFactory $customerFactory |
| 41 | + * @param \Magento\Customer\Model\AddressFactory $addressFactory |
| 42 | + * @param \Magento\Customer\Model\Metadata\FormFactory $formFactory |
| 43 | + * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory |
| 44 | + * @param \Magento\Customer\Helper\View $viewHelper |
| 45 | + * @param \Magento\Framework\Math\Random $random |
| 46 | + * @param CustomerRepositoryInterface $customerRepository |
| 47 | + * @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter |
| 48 | + * @param Mapper $addressMapper |
| 49 | + * @param AccountManagementInterface $customerAccountManagement |
| 50 | + * @param AddressRepositoryInterface $addressRepository |
| 51 | + * @param CustomerInterfaceFactory $customerDataFactory |
| 52 | + * @param AddressInterfaceFactory $addressDataFactory |
| 53 | + * @param \Magento\Customer\Model\Customer\Mapper $customerMapper |
| 54 | + * @param \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor |
| 55 | + * @param DataObjectHelper $dataObjectHelper |
| 56 | + * @param ObjectFactory $objectFactory |
| 57 | + * @param \Magento\Framework\View\LayoutFactory $layoutFactory |
| 58 | + * @param \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory |
| 59 | + * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory |
| 60 | + * @param \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory |
| 61 | + * @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory |
| 62 | + * |
| 63 | + * @SuppressWarnings(PHPMD.ExcessiveParameterList) |
| 64 | + */ |
| 65 | + public function __construct( |
| 66 | + \Magento\Backend\App\Action\Context $context, |
| 67 | + \Magento\Framework\Registry $coreRegistry, |
| 68 | + \Magento\Framework\App\Response\Http\FileFactory $fileFactory, |
| 69 | + \Magento\Customer\Model\CustomerFactory $customerFactory, |
| 70 | + \Magento\Customer\Model\AddressFactory $addressFactory, |
| 71 | + \Magento\Customer\Model\Metadata\FormFactory $formFactory, |
| 72 | + \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, |
| 73 | + \Magento\Customer\Helper\View $viewHelper, |
| 74 | + \Magento\Framework\Math\Random $random, |
| 75 | + CustomerRepositoryInterface $customerRepository, |
| 76 | + \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter, |
| 77 | + Mapper $addressMapper, |
| 78 | + AccountManagementInterface $customerAccountManagement, |
| 79 | + AddressRepositoryInterface $addressRepository, |
| 80 | + CustomerInterfaceFactory $customerDataFactory, |
| 81 | + AddressInterfaceFactory $addressDataFactory, |
| 82 | + \Magento\Customer\Model\Customer\Mapper $customerMapper, |
| 83 | + \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor, |
| 84 | + DataObjectHelper $dataObjectHelper, |
| 85 | + ObjectFactory $objectFactory, |
| 86 | + \Magento\Framework\View\LayoutFactory $layoutFactory, |
| 87 | + \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory, |
| 88 | + \Magento\Framework\View\Result\PageFactory $resultPageFactory, |
| 89 | + \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory, |
| 90 | + \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory, |
| 91 | + CustomerTokenServiceInterface $tokenService |
| 92 | + ) { |
| 93 | + $this->tokenService = $tokenService; |
| 94 | + parent::__construct( |
| 95 | + $context, |
| 96 | + $coreRegistry, |
| 97 | + $fileFactory, |
| 98 | + $customerFactory, |
| 99 | + $addressFactory, |
| 100 | + $formFactory, |
| 101 | + $subscriberFactory, |
| 102 | + $viewHelper, |
| 103 | + $random, |
| 104 | + $customerRepository, |
| 105 | + $extensibleDataObjectConverter, |
| 106 | + $addressMapper, |
| 107 | + $customerAccountManagement, |
| 108 | + $addressRepository, |
| 109 | + $customerDataFactory, |
| 110 | + $addressDataFactory, |
| 111 | + $customerMapper, |
| 112 | + $dataObjectProcessor, |
| 113 | + $dataObjectHelper, |
| 114 | + $objectFactory, |
| 115 | + $layoutFactory, |
| 116 | + $resultLayoutFactory, |
| 117 | + $resultPageFactory, |
| 118 | + $resultForwardFactory, |
| 119 | + $resultJsonFactory |
| 120 | + ); |
| 121 | + } |
| 122 | + |
15 | 123 | /**
|
16 | 124 | * Reset customer's tokens handler
|
17 | 125 | *
|
|
0 commit comments