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

update() protected méthode

Updates and save the email log entry to the db and the file-system
protected update ( )
    protected function update()
    {
        $this->getDao()->update();
        if (!is_dir(PIMCORE_LOG_MAIL_PERMANENT)) {
            File::mkdir(PIMCORE_LOG_MAIL_PERMANENT);
        }
        if ($html = $this->getBodyHtml()) {
            if (File::put(PIMCORE_LOG_MAIL_PERMANENT . '/email-' . $this->getId() . '-html.log', $html) === false) {
                Logger::warn('Could not write html email log file. LogId: ' . $this->getId());
            }
        }
        if ($text = $this->getBodyText()) {
            if (File::put(PIMCORE_LOG_MAIL_PERMANENT . '/email-' . $this->getId() . '-text.log', $text) === false) {
                Logger::warn('Could not write text email log file. LogId: ' . $this->getId());
            }
        }
    }