SilverStripe\Versioned\Versioned::withVersionedMode
Invoke a callback which may modify reading mode, but ensures this mode is restored after completion, without modifying global state.
The desired reading mode should be set by the callback directly
Signature
public function withVersionedMode(callable
$callback )
Parameters
$callback
— object
Returns
- mixed
- Result of $callback