src/Controllers/HistoryViewerController.php
protected function scaffoldForm($formName, array $context = [], array $extra = [])
    {
        /** @var FormFactory $scaffolder */
        $scaffolder = Injector::inst()->get(DataObjectVersionFormFactory::class);
        $form = $scaffolder->getForm($this, $formName, $context);

        // Set form handler with class name, ID and VersionID
        return $form->setRequestHandler(
            LeftAndMainFormRequestHandler::create($form, $extra)
        );
    }
protected function scaffoldForm($formName, array $context = [], array $extra = [])
    {
        /** @var FormFactory $scaffolder */
        $scaffolder = Injector::inst()->get(DataObjectVersionFormFactory::class);
        $form = $scaffolder->getForm($this, $formName, $context);

        // Set form handler with class name, ID and VersionID
        return $form->setRequestHandler(
            LeftAndMainFormRequestHandler::create($form, $extra)
        );
    }
protected function scaffoldForm ( $ formName , array $ context = [ ] , array $ extra = [ ] ) { /** @var FormFactory $scaffolder */ $ scaffolder = Injector :: inst ( ) -> get ( DataObjectVersionFormFactory :: class ) ; $ form = $ scaffolder -> getForm ( $ this , $ formName , $ context ) ; // Set form handler with class name, ID and VersionID return $ form -> setRequestHandler ( LeftAndMainFormRequestHandler :: create ( $ form , $ extra ) ) ; }
Given some context, scaffold a form using the FormFactory and return it

@param string $formName The name for the returned {@link Form}
@param array $context Context arguments for the {@link FormFactory}
@param array $extra Context arguments for the {@link LeftAndMainFormRequestHandler}
@return Form
Given some context scaffold a form using the FormFactory and return it