public function setEmailLogExistsText() { $file = PIMCORE_LOG_MAIL_PERMANENT . '/email-' . $this->getId() . '-text.log'; $this->emailLogExistsText = is_file($file) && is_readable($file) ? 1 : 0; return $this; }
/** * 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; }