11 use Magento\Customer\Api\Data\AddressInterfaceFactory;
12 use Magento\Customer\Api\Data\CustomerInterfaceFactory;
16 use Magento\Framework\DataObjectFactory as ObjectFactory;
202 \
Magento\Framework\Registry $coreRegistry,
206 \
Magento\Customer\Model\Metadata\FormFactory $formFactory,
207 \
Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
208 \
Magento\Customer\Helper\View $viewHelper,
209 \
Magento\Framework\Math\Random $random,
211 \
Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter,
220 ObjectFactory $objectFactory,
227 $this->_coreRegistry = $coreRegistry;
228 $this->_fileFactory = $fileFactory;
231 $this->_formFactory = $formFactory;
232 $this->_subscriberFactory = $subscriberFactory;
233 $this->_viewHelper = $viewHelper;
234 $this->_random = $random;
236 $this->_extensibleDataObjectConverter = $extensibleDataObjectConverter;
244 $this->_objectFactory = $objectFactory;
251 parent::__construct($context);
278 $resultPage->getConfig()->getTitle()->prepend(
__(
'Customers'));
291 $messages = (array)$messages;
294 $callback =
function ($error) use (
$session) {
295 if (!$error instanceof
Error) {
296 $error =
new Error($error);
298 $this->messageManager->addMessage($error);
300 array_walk_recursive($messages, $callback);
313 if (!is_array($customerIds)) {
314 $this->messageManager->addError(
__(
'Please select customer(s).'));
317 $customersUpdated = 0;
322 }
catch (\Exception $exception) {
323 $this->messageManager->addError($exception->getMessage());
326 return $customersUpdated;
const CURRENT_CUSTOMER_ID
__construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry, \Magento\Framework\App\Response\Http\FileFactory $fileFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Customer\Model\AddressFactory $addressFactory, \Magento\Customer\Model\Metadata\FormFactory $formFactory, \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, \Magento\Customer\Helper\View $viewHelper, \Magento\Framework\Math\Random $random, CustomerRepositoryInterface $customerRepository, \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter, Mapper $addressMapper, AccountManagementInterface $customerAccountManagement, AddressRepositoryInterface $addressRepository, CustomerInterfaceFactory $customerDataFactory, AddressInterfaceFactory $addressDataFactory, \Magento\Customer\Model\Customer\Mapper $customerMapper, \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor, DataObjectHelper $dataObjectHelper, ObjectFactory $objectFactory, \Magento\Framework\View\LayoutFactory $layoutFactory, \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory, \Magento\Framework\View\Result\PageFactory $resultPageFactory, \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory, \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory)
$customerAccountManagement
$_extensibleDataObjectConverter
prepareDefaultCustomerTitle(\Magento\Backend\Model\View\Result\Page $resultPage)
_addSessionErrorMessages($messages)
actUponMultipleCustomers(callable $singleAction, $customerIds)