6
6
namespace Magento \Customer \Controller \Adminhtml \Index ;
7
7
8
8
use Magento \Backend \App \Action ;
9
+ use Magento \Customer \Api \CustomerRepositoryInterface ;
10
+ use Magento \Customer \Api \Data \CustomerInterface ;
9
11
use Magento \Customer \Model \EmailNotificationInterface ;
10
- use Magento \Customer \Test \Block \Form \Login ;
11
12
use Magento \Customer \Ui \Component \Listing \AttributeRepository ;
12
- use Magento \Customer \Api \Data \CustomerInterface ;
13
- use Magento \Customer \Api \CustomerRepositoryInterface ;
14
13
use Magento \Framework \App \Action \HttpPostActionInterface ;
14
+ use Magento \Framework \Message \MessageInterface ;
15
15
16
16
/**
17
+ * Customer inline edit action
18
+ *
17
19
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
18
20
*/
19
21
class InlineEdit extends \Magento \Backend \App \Action implements HttpPostActionInterface
@@ -102,7 +104,11 @@ private function getEmailNotification()
102
104
}
103
105
104
106
/**
107
+ * Inline edit action execute
108
+ *
105
109
* @return \Magento\Framework\Controller\Result\Json
110
+ * @throws \Magento\Framework\Exception\LocalizedException
111
+ * @throws \Magento\Framework\Exception\NoSuchEntityException
106
112
*/
107
113
public function execute ()
108
114
{
@@ -250,7 +256,7 @@ protected function processAddressData(array $data)
250
256
protected function getErrorMessages ()
251
257
{
252
258
$ messages = [];
253
- foreach ($ this ->getMessageManager ()->getMessages ()->getItems () as $ error ) {
259
+ foreach ($ this ->getMessageManager ()->getMessages ()->getErrors () as $ error ) {
254
260
$ messages [] = $ error ->getText ();
255
261
}
256
262
return $ messages ;
@@ -263,7 +269,7 @@ protected function getErrorMessages()
263
269
*/
264
270
protected function isErrorExists ()
265
271
{
266
- return (bool )$ this ->getMessageManager ()->getMessages (true )->getCount ( );
272
+ return (bool )$ this ->getMessageManager ()->getMessages (true )->getCountByType (MessageInterface:: TYPE_ERROR );
267
273
}
268
274
269
275
/**
0 commit comments