SilverStripe\Versioned\Versioned::get_one_by_stage
Get a singleton instance of a class in the given stage.
Signature
public function get_one_by_stage(string
$class,
string
$stage,
[string
$filter = '',
[boolean
$cache = true,
[string
$sort = '']]] )
Parameters
$class
—
string
- The name of the class.
$stage
—
string
- The name of the stage.
$filter
—
string
- A filter to be inserted into the WHERE clause.
$cache
—
boolean
- Use caching.
$sort
—
string
- A sort expression to be inserted into the ORDER BY clause.
Returns
- DataObject