class VersionFilters (View source)

deprecated 5.3.0 Will be moved to the silverstripe/graphql module

Methods

public
__construct()

No description

public
null|void
applyToReadingState(array $versioningArgs)

Use this as a fallback where resolver results aren't queried as a DataList, but rather use DataObject::get_one(). Example: SiteTree::get_by_link().

public
applyToList(DataList $list, array $versioningArgs)

No description

public
validateArgs(array $versioningArgs)

No description

protected
bool
isValidDate(string $date)

Returns true if date is in proper YYYY-MM-DD format

Details

__construct()

No description

null|void applyToReadingState(array $versioningArgs)

Use this as a fallback where resolver results aren't queried as a DataList, but rather use DataObject::get_one(). Example: SiteTree::get_by_link().

Note that the 'status' and 'version' modes are not supported. Wrap this call in Versioned::withVersionedMode() in order to avoid side effects.

Parameters

array $versioningArgs

Return Value

null|void

DataList applyToList(DataList $list, array $versioningArgs)

No description

Parameters

DataList $list
array $versioningArgs

Return Value

DataList

Exceptions

InvalidArgumentException

validateArgs(array $versioningArgs)

No description

Parameters

array $versioningArgs

Exceptions

InvalidArgumentException

protected bool isValidDate(string $date)

Returns true if date is in proper YYYY-MM-DD format

Parameters

string $date

Return Value

bool