Pimcore\Model\Tool\Email\Log::setEmailLogExistsHtml PHP Méthode

setEmailLogExistsHtml() public méthode

Checks if a html log file exits and sets $this->emailLogExistsHtml to 0 or 1
    public function setEmailLogExistsHtml()
    {
        $file = PIMCORE_LOG_MAIL_PERMANENT . '/email-' . $this->getId() . '-html.log';
        $this->emailLogExistsHtml = is_file($file) && is_readable($file) ? 1 : 0;
        return $this;
    }

Usage Example

Exemple #1
0
 /**
  * Returns the EmailLog entry by the given id
  *
  * @static
  * @param integer $id
  * @return EmailLog|null
  */
 public static function getById($id)
 {
     $id = intval($id);
     if ($id < 1) {
         return null;
     }
     $emailLog = new Model\Tool\Email\Log();
     $emailLog->getDao()->getById($id);
     $emailLog->setEmailLogExistsHtml();
     $emailLog->setEmailLogExistsText();
     return $emailLog;
 }