src/Utility/ICal/IcEmail.php
protected function getChangelog() : string
    {
        $result = '';

        // plain changelog if entity is new
        if ($this->entity->isNew()) {
            return $result;
        }

        // get entity's modified fields
        $fields = $this->entity->extractOriginalChanged($this->entity->visibleProperties());

        if (empty($fields)) {
            return $result;
        }

        // remove ignored fields
        foreach ($this->ignoredFields as $field) {
            if (array_key_exists($field, $fields)) {
                unset($fields[$field]);
            }
        }

        if (empty($fields)) {
            return $result;
        }

        foreach ($fields as $k => $v) {
            $result .= sprintf(static::CHANGELOG, Inflector::humanize($k), $v, $this->entity->{$k});
        }

        return $result;
    }
protected function getChangelog() : string
    {
        $result = '';

        // plain changelog if entity is new
        if ($this->entity->isNew()) {
            return $result;
        }

        // get entity's modified fields
        $fields = $this->entity->extractOriginalChanged($this->entity->visibleProperties());

        if (empty($fields)) {
            return $result;
        }

        // remove ignored fields
        foreach ($this->ignoredFields as $field) {
            if (array_key_exists($field, $fields)) {
                unset($fields[$field]);
            }
        }

        if (empty($fields)) {
            return $result;
        }

        foreach ($fields as $k => $v) {
            $result .= sprintf(static::CHANGELOG, Inflector::humanize($k), $v, $this->entity->{$k});
        }

        return $result;
    }
protected function getChangelog ( ) : string { $ result = '' ; // plain changelog if entity is new if ( $ this -> entity -> isNew ( ) ) { return $ result ; } // get entity's modified fields $ fields = $ this -> entity -> extractOriginalChanged ( $ this -> entity -> visibleProperties ( ) ) ; if ( empty ( $ fields ) ) { return $ result ; } // remove ignored fields foreach ( $ this -> ignoredFields as $ field ) { if ( array_key_exists ( $ field , $ fields ) ) { unset ( $ fields [ $ field ] ) ; } } if ( empty ( $ fields ) ) { return $ result ; } foreach ( $ fields as $ k => $ v ) { $ result .= sprintf ( static :: CHANGELOG , Inflector :: humanize ( $ k ) , $ v , $ this -> entity -> { $ k } ) ; } return $ result ; }
Creates changelog report in string format.

Example:

Subject: changed from 'Foo' to 'Bar'.
Content: changed from 'Hello world' to 'Hi there'.

@return string
Creates changelog report in string format .