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 ;
1413use Magento \Framework \App \Action \HttpPostActionInterface ;
14+ use Magento \Framework \Message \MessageInterface ;
1515
1616/**
17+ * Customer inline edit action
18+ *
1719 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1820 */
1921class InlineEdit extends \Magento \Backend \App \Action implements HttpPostActionInterface
@@ -102,7 +104,11 @@ private function getEmailNotification()
102104 }
103105
104106 /**
107+ * Inline edit action execute
108+ *
105109 * @return \Magento\Framework\Controller\Result\Json
110+ * @throws \Magento\Framework\Exception\LocalizedException
111+ * @throws \Magento\Framework\Exception\NoSuchEntityException
106112 */
107113 public function execute ()
108114 {
@@ -250,7 +256,7 @@ protected function processAddressData(array $data)
250256 protected function getErrorMessages ()
251257 {
252258 $ messages = [];
253- foreach ($ this ->getMessageManager ()->getMessages ()->getItems () as $ error ) {
259+ foreach ($ this ->getMessageManager ()->getMessages ()->getErrors () as $ error ) {
254260 $ messages [] = $ error ->getText ();
255261 }
256262 return $ messages ;
@@ -263,7 +269,7 @@ protected function getErrorMessages()
263269 */
264270 protected function isErrorExists ()
265271 {
266- return (bool )$ this ->getMessageManager ()->getMessages (true )->getCount ( );
272+ return (bool )$ this ->getMessageManager ()->getMessages (true )->getCountByType (MessageInterface:: TYPE_ERROR );
267273 }
268274
269275 /**
0 commit comments