src/Extensions/ContentReviewCMSExtension.php
public function getReviewContentForm($id)
    {
        $page = $this->findRecord(['ID' => $id]);
        $user = Security::getCurrentUser();
        if (!$page->canEdit() || ($page->hasMethod('canBeReviewedBy') && !$page->canBeReviewedBy($user))) {
            $this->owner->httpError(403, _t(
                __CLASS__.'.ErrorItemPermissionDenied',
                'It seems you don\'t have the necessary permissions to review this content'
            ));
            return null;
        }

        $form = $this->getReviewContentHandler()->Form($page);
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
            $schemaId = $this->owner->join_links($this->owner->Link('schema/ReviewContentForm'), $id);
            return $this->getSchemaResponse($schemaId, $form, $errors);
        });

        return $form;
    }
public function getReviewContentForm($id)
    {
        $page = $this->findRecord(['ID' => $id]);
        $user = Security::getCurrentUser();
        if (!$page->canEdit() || ($page->hasMethod('canBeReviewedBy') && !$page->canBeReviewedBy($user))) {
            $this->owner->httpError(403, _t(
                __CLASS__.'.ErrorItemPermissionDenied',
                'It seems you don\'t have the necessary permissions to review this content'
            ));
            return null;
        }

        $form = $this->getReviewContentHandler()->Form($page);
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
            $schemaId = $this->owner->join_links($this->owner->Link('schema/ReviewContentForm'), $id);
            return $this->getSchemaResponse($schemaId, $form, $errors);
        });

        return $form;
    }
Return a handler for "content due for review" forms, according to the given object ID

@param  int $id
@return Form|null