src/Forms/HistoryViewerField.php
public function getSchemaDataDefaults()
    {
        $data = parent::getSchemaDataDefaults();

        $sourceRecord = $this->getSourceRecord();

        $data['data'] = array_merge($data['data'], [
            'recordId' => $sourceRecord ? $sourceRecord->ID : null,
            'recordClass' => $sourceRecord ? $sourceRecord->ClassName : null,
            'contextKey' => $this->getContextKey(),
            'isPreviewable' => $this->getPreviewEnabled(),
            'limit' => $this->config()->get('default_page_size'),
            'offset' => 0,
            'page' => 0,
        ]);

        return $data;
    }
public function getSchemaDataDefaults()
    {
        $data = parent::getSchemaDataDefaults();

        $sourceRecord = $this->getSourceRecord();

        $data['data'] = array_merge($data['data'], [
            'recordId' => $sourceRecord ? $sourceRecord->ID : null,
            'recordClass' => $sourceRecord ? $sourceRecord->ClassName : null,
            'contextKey' => $this->getContextKey(),
            'isPreviewable' => $this->getPreviewEnabled(),
            'limit' => $this->config()->get('default_page_size'),
            'offset' => 0,
            'page' => 0,
        ]);

        return $data;
    }
public function getSchemaDataDefaults ( ) { $ data = parent :: getSchemaDataDefaults ( ) ; $ sourceRecord = $ this -> getSourceRecord ( ) ; $ data [ 'data' ] = array_merge ( $ data [ 'data' ] , [ 'recordId' => $ sourceRecord ? $ sourceRecord -> ID : null , 'recordClass' => $ sourceRecord ? $ sourceRecord -> ClassName : null , 'contextKey' => $ this -> getContextKey ( ) , 'isPreviewable' => $ this -> getPreviewEnabled ( ) , 'limit' => $ this -> config ( ) -> get ( 'default_page_size' ) , 'offset' => 0 , 'page' => 0 , ] ) ; return $ data ; }
Provide the necessary input data for React to power the history viewer

{@inheritDoc}
Provide the necessary input data for React to power the history viewer