SilverStripe\Versioned\Versioned::get_versionnumber_by_stage
Gets the current version number of a specific record.
Signature
public function get_versionnumber_by_stage(string
$class,
string
$stage,
int
$id,
[boolean
$cache = true] )
Parameters
$class
— string- Class to search
$stage
— string- Stage name
$id
— int- ID of the record
$cache
— boolean- Set to true to turn on cache
Returns
- int|null
- Return the version number, or null if not on this stage