예제 #1
0
 /**
  * Update the reviewer name, email and profile
  *
  * @param \XLite\Module\XC\Reviews\Model\Review $review    Review model object
  * @param integer                               $profileId Profile identificator
  *
  * @return void
  */
 protected function updateProfile(\XLite\Module\XC\Reviews\Model\Review $review, $profileId)
 {
     $profile = \XLite\Core\Database::getRepo('XLite\\Model\\Profile')->find($profileId);
     if ($profile) {
         $review->setProfile($profile);
         $review->setReviewerName($profile->getName());
         $review->setEmail($profile->getLogin());
     }
 }
 /**
  * {@inheritDoc}
  */
 public function setEmail($email)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setEmail', array($email));
     return parent::setEmail($email);
 }
예제 #3
0
 /**
  * Import 'email' value
  *
  * @param \XLite\Module\XC\Reviews\Model\Review $model  Review
  * @param string                                $value  Value
  * @param array                                 $column Column info
  *
  * @return void
  */
 protected function importEmailColumn(\XLite\Module\XC\Reviews\Model\Review $model, $value, array $column)
 {
     $model->setEmail($value);
     if ($value) {
         $result = \XLite\Core\Database::getRepo('XLite\\Model\\Profile')->findByLogin($value);
         if ($result) {
             $model->setProfile($result);
         }
     }
 }