private function logChange($contentType, $contentId, $newContent = null, $oldContent = null, $comment = null)
    {
        $type = $oldContent ? 'Update' : 'Insert';

        $this->loggerChange->info(
            $type . ' record',
            [
                'action'      => strtoupper($type),
                'contenttype' => $contentType,
                'id'          => $contentId,
                'new'         => $newContent ? $newContent->toArray() : null,
                'old'         => $oldContent ? $oldContent->toArray() : null,
                'comment'     => $comment,
            ]
        );
    }
private function logChange($contentType, $contentId, $newContent = null, $oldContent = null, $comment = null)
    {
        $type = $oldContent ? 'Update' : 'Insert';

        $this->loggerChange->info(
            $type . ' record',
            [
                'action'      => strtoupper($type),
                'contenttype' => $contentType,
                'id'          => $contentId,
                'new'         => $newContent ? $newContent->toArray() : null,
                'old'         => $oldContent ? $oldContent->toArray() : null,
                'comment'     => $comment,
            ]
        );
    }
private function logChange ( $ contentType , $ contentId , $ newContent = null , $ oldContent = null , $ comment = null ) { $ type = $ oldContent ? 'Update' : 'Insert' ; $ this -> loggerChange -> info ( $ type . ' record' , [ 'action' => strtoupper ( $ type ) , 'contenttype' => $ contentType , 'id' => $ contentId , 'new' => $ newContent ? $ newContent -> toArray ( ) : null , 'old' => $ oldContent ? $ oldContent -> toArray ( ) : null , 'comment' => $ comment , ] ) ; }
Add a change log entry to track the change.

@param string              $contentType
@param int                 $contentId
@param Entity\Content      $newContent
@param Entity\Content|null $oldContent
@param string|null         $comment
Add a change log entry to track the change .