Contao\Controller::createNewVersion PHP Method

createNewVersion() protected method

Create a new version of a record
Deprecation: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use Versions->create() instead.
protected createNewVersion ( string $strTable, integer $intId )
$strTable string The table name
$intId integer The ID of the element to be versioned
    protected function createNewVersion($strTable, $intId)
    {
        @trigger_error('Using Controller::createNewVersion() has been deprecated and will no longer work in Contao 5.0. Use Versions->create() instead.', E_USER_DEPRECATED);
        $objVersions = new \Versions($strTable, $intId);
        $objVersions->create();
    }