Plugin/TemplatePlugin.php
private function getProcessedTemplateBeforeSave($result)
    {
        //saving array values
        if (empty($args)) {
            $this->getResultIfArgsEmptyForBeforeSave($result);
        } else {
            //saving string value
            $field = $args[0];

            //compress the text body when is a dotmailer template
            if ($field == 'template_text' && ! $this->isStringCompressed($result) &&
                $this->transactionalHelper->isDotmailerTemplate($this->templateCode)
            ) {
                $result = $this->compressString($result);
            }
            if ($field == 'template_id') {
                $this->saveTemplateIdInRegistry($result);
            }
        }

        return $result;
    }
private function getProcessedTemplateBeforeSave($result)
    {
        //saving array values
        if (empty($args)) {
            $this->getResultIfArgsEmptyForBeforeSave($result);
        } else {
            //saving string value
            $field = $args[0];

            //compress the text body when is a dotmailer template
            if ($field == 'template_text' && ! $this->isStringCompressed($result) &&
                $this->transactionalHelper->isDotmailerTemplate($this->templateCode)
            ) {
                $result = $this->compressString($result);
            }
            if ($field == 'template_id') {
                $this->saveTemplateIdInRegistry($result);
            }
        }

        return $result;
    }
private function getProcessedTemplateBeforeSave ( $ result ) { //saving array values if ( empty ( $ args ) ) { $ this -> getResultIfArgsEmptyForBeforeSave ( $ result ) ; } else { //saving string value $ field = $ args [ 0 ] ; //compress the text body when is a dotmailer template if ( $ field == 'template_text' && ! $ this -> isStringCompressed ( $ result ) && $ this -> transactionalHelper -> isDotmailerTemplate ( $ this -> templateCode ) ) { $ result = $ this -> compressString ( $ result ) ; } if ( $ field == 'template_id' ) { $ this -> saveTemplateIdInRegistry ( $ result ) ; } } return $ result ; }
Get data before saving

@param mixed $result

@return mixed
Get data before saving