/**
  * Register review.
  *
  * @param $review
  */
 public function registerReview($review)
 {
     try {
         $this->reviewFactory->create()->setReviewId($review->getReviewId())->setCustomerId($review->getCustomerId())->setStoreId($review->getStoreId())->save();
     } catch (\Exception $e) {
         $this->helper->debug((string) $e, []);
     }
 }
 /**
  * @return \Magento\Backend\Model\View\Result\Redirect
  */
 public function execute()
 {
     $searchIds = $this->getRequest()->getParam('selected');
     if (!is_array($searchIds)) {
         $this->messageManager->addErrorMessage(__('Please select reviews.'));
     } else {
         try {
             foreach ($searchIds as $searchId) {
                 //@codingStandardsIgnoreStart
                 $model = $this->review->create()->setId($searchId);
                 $model->delete();
                 //@codingStandardsIgnoreEnd
             }
             $this->messageManager->addSuccessMessage(__('Total of %1 record(s) were deleted.', count($searchIds)));
         } catch (\Exception $e) {
             $this->messageManager->addErrorMessage($e->getMessage());
         }
     }
     /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
     $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
     $resultRedirect->setPath('*/*/');
     return $resultRedirect;
 }