66namespace Magento \Customer \Controller \Adminhtml \Index ;
77
88use Magento \Backend \App \Action ;
9+ use Magento \Customer \Api \CustomerRepositoryInterface ;
10+ use Magento \Customer \Api \Data \CustomerInterface ;
911use Magento \Customer \Model \EmailNotificationInterface ;
10- use Magento \Customer \Test \Block \Form \Login ;
1112use Magento \Customer \Ui \Component \Listing \AttributeRepository ;
12- use Magento \Customer \Api \Data \CustomerInterface ;
13- use Magento \Customer \Api \CustomerRepositoryInterface ;
13+ use Magento \Framework \Message \MessageInterface ;
1414
1515/**
16+ * Customer inline edit action
17+ *
1618 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1719 */
1820class InlineEdit extends \Magento \Backend \App \Action
@@ -101,7 +103,11 @@ private function getEmailNotification()
101103 }
102104
103105 /**
106+ * Inline edit action execute
107+ *
104108 * @return \Magento\Framework\Controller\Result\Json
109+ * @throws \Magento\Framework\Exception\LocalizedException
110+ * @throws \Magento\Framework\Exception\NoSuchEntityException
105111 */
106112 public function execute ()
107113 {
@@ -249,7 +255,7 @@ protected function processAddressData(array $data)
249255 protected function getErrorMessages ()
250256 {
251257 $ messages = [];
252- foreach ($ this ->getMessageManager ()->getMessages ()->getItems () as $ error ) {
258+ foreach ($ this ->getMessageManager ()->getMessages ()->getErrors () as $ error ) {
253259 $ messages [] = $ error ->getText ();
254260 }
255261 return $ messages ;
@@ -262,7 +268,7 @@ protected function getErrorMessages()
262268 */
263269 protected function isErrorExists ()
264270 {
265- return (bool )$ this ->getMessageManager ()->getMessages (true )->getCount ( );
271+ return (bool )$ this ->getMessageManager ()->getMessages (true )->getCountByType (MessageInterface:: TYPE_ERROR );
266272 }
267273
268274 /**
0 commit comments