Esempio n. 1
0
 /**
  * Check changes in request and call some functions on it
  * @param AW_Rma_Model_Entity $rmaRequest
  * @param string $commentText
  * @param boolean $isFrontend
  * @return AW_Rma_Model_Notify
  */
 public function checkChanges($rmaRequest, $commentText = null, $isFrontend = FALSE)
 {
     if ($this->_isGenerallyEnabled()) {
         if ($rmaRequest->getData('status') != $rmaRequest->getOrigData('status')) {
             # Status changes
             $this->setFlagStatusChanged(true);
             $this->_notifyByStatus($rmaRequest, $commentText, $isFrontend);
         } elseif ($commentText) {
             # Comment added without status change
             $this->notifyAboutComment($rmaRequest, $commentText, $isFrontend);
         }
     }
     return $this;
 }