Bolt\Storage\ContentRequest\Save::logChange PHP Метод

logChange() приватный Метод

Add a change log entry to track the change.
private logChange ( string $contentType, integer $contentId, Content $newContent = null, Content | null $oldContent = null, string | null $comment = null )
$contentType string
$contentId integer
$newContent Bolt\Storage\Entity\Content
$oldContent Bolt\Storage\Entity\Content | null
$comment string | null
    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]);
    }