@@ -299,44 +299,18 @@ private function populateCustomerWithSecureData($customerModel, $passwordHash =
299
299
}
300
300
}
301
301
302
- /**
303
- * Retrieve customer.
304
- *
305
- * @param string $email
306
- * @param int|null $websiteId
307
- * @return \Magento\Customer\Api\Data\CustomerInterface
308
- * @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified email does not exist.
309
- * @throws \Magento\Framework\Exception\LocalizedException
310
- */
311
302
public function get ($ email , $ websiteId = null )
312
303
{
313
304
$ customerModel = $ this ->customerRegistry ->retrieveByEmail ($ email , $ websiteId );
314
305
return $ customerModel ->getDataModel ();
315
306
}
316
307
317
- /**
318
- * Get customer by Customer ID.
319
- *
320
- * @param int $customerId
321
- * @return \Magento\Customer\Api\Data\CustomerInterface
322
- * @throws \Magento\Framework\Exception\NoSuchEntityException If customer with the specified ID does not exist.
323
- * @throws \Magento\Framework\Exception\LocalizedException
324
- */
325
308
public function getById ($ customerId )
326
309
{
327
310
$ customerModel = $ this ->customerRegistry ->retrieve ($ customerId );
328
311
return $ customerModel ->getDataModel ();
329
312
}
330
313
331
- /**
332
- * Retrieve customers which match a specified criteria.
333
- *
334
- * {@inheritdoc}
335
- *
336
- * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
337
- * @return \Magento\Customer\Api\Data\CustomerSearchResultsInterface
338
- * @throws \Magento\Framework\Exception\LocalizedException
339
- */
340
314
public function getList (SearchCriteriaInterface $ searchCriteria )
341
315
{
342
316
$ searchResults = $ this ->searchResultsFactory ->create ();
@@ -374,26 +348,11 @@ public function getList(SearchCriteriaInterface $searchCriteria)
374
348
return $ searchResults ;
375
349
}
376
350
377
- /**
378
- * Delete customer.
379
- *
380
- * @param \Magento\Customer\Api\Data\CustomerInterface $customer
381
- * @return bool true on success
382
- * @throws \Magento\Framework\Exception\LocalizedException
383
- */
384
351
public function delete (CustomerInterface $ customer )
385
352
{
386
353
return $ this ->deleteById ($ customer ->getId ());
387
354
}
388
355
389
- /**
390
- * Delete customer by Customer ID.
391
- *
392
- * @param int $customerId
393
- * @return bool true on success
394
- * @throws \Magento\Framework\Exception\NoSuchEntityException
395
- * @throws \Magento\Framework\Exception\LocalizedException
396
- */
397
356
public function deleteById ($ customerId )
398
357
{
399
358
$ customerModel = $ this ->customerRegistry ->retrieve ($ customerId );
0 commit comments