Bolt\Controller\Backend\Log::changeRecord PHP Method

changeRecord() public method

Show a single change log entry.
public changeRecord ( Request $request, string $contenttype, integer $contentid, integer $id ) : TemplateResponse
$request Symfony\Component\HttpFoundation\Request
$contenttype string ContentType slug
$contentid integer Content record ID
$id integer The change log entry ID
return Bolt\Response\TemplateResponse
    public function changeRecord(Request $request, $contenttype, $contentid, $id)
    {
        $entry = $this->changeLogRepository()->getChangeLogEntry($contenttype, $contentid, $id, '=');
        if (empty($entry)) {
            $error = Trans::__('logs.change-log.not-found');
            $this->abort(Response::HTTP_NOT_FOUND, $error);
        }
        $prev = $this->changeLogRepository()->getChangeLogEntry($contenttype, $contentid, $id, '<');
        $next = $this->changeLogRepository()->getChangeLogEntry($contenttype, $contentid, $id, '>');
        $context = ['contenttype' => ['slug' => $contenttype], 'entry' => $entry, 'next_entry' => $next, 'prev_entry' => $prev];
        return $this->render('@bolt/changelog/changelog_record_single.twig', $context);
    }