EntryRevisions

Type
Class
Namespace
craft\web\twig\variables
Inherits
craft\web\twig\variables\EntryRevisions
Since
3.0
Deprecated in
in 3.0

Class EntryRevisions variable.

View source

Public Methods

MethodDescription
getDraftById()Returns an entry draft by its offset.
getDraftsByEntryId()Returns entry drafts by an entry ID.
getEditableDraftsByEntryId()Returns the drafts of a given entry that are editable by the current user.
getVersionById()Returns an entry version by its ID.
getVersionsByEntryId()Returns entry versions by an entry ID.

getDraftById()

Returns an entry draft by its offset.

View source

Arguments

Returns

craft\models\EntryDraft, null

Signature

public craft\models\EntryDraft, null getDraftById ( \craft\web\twig\variables\int $draftId )

getDraftsByEntryId()

Returns entry drafts by an entry ID.

View source

Arguments

Returns

craft\models\EntryDraft[]

Throws

Signature

public craft\models\EntryDraft[] getDraftsByEntryId ( \craft\web\twig\variables\int $entryId, \craft\web\twig\variables\string $siteHandle = null )

getEditableDraftsByEntryId()

Returns the drafts of a given entry that are editable by the current user.

View source

Arguments

Returns

craft\models\EntryDraft[]

Throws

Signature

public craft\models\EntryDraft[] getEditableDraftsByEntryId ( \craft\web\twig\variables\int $entryId, \craft\web\twig\variables\string $siteHandle = null )

getVersionById()

Returns an entry version by its ID.

View source

Arguments

Returns

craft\models\EntryVersion, null

Signature

public craft\models\EntryVersion, null getVersionById ( \craft\web\twig\variables\int $versionId )

getVersionsByEntryId()

Returns entry versions by an entry ID.

View source

Arguments

Returns

craft\models\EntryVersion[]

Throws

Signature

public craft\models\EntryVersion[] getVersionsByEntryId ( \craft\web\twig\variables\int $entryId, \craft\web\twig\variables\string $siteHandle )