Class craft\web\twig\variables\EntryRevisions
- Inheritance
- craft\web\twig\variables\EntryRevisions
- Available since version
- 3.0
- Deprecated since version
- in 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/web/twig/variables/EntryRevisions.php
Class EntryRevisions variable.
Method | Description | Defined By |
---|---|---|
getDraftById() |
Returns an entry draft by its offset. | craft\web\twig\variables\EntryRevisions |
getDraftsByEntryId() |
Returns entry drafts by an entry ID. | craft\web\twig\variables\EntryRevisions |
getEditableDraftsByEntryId() |
Returns the drafts of a given entry that are editable by the current user. | craft\web\twig\variables\EntryRevisions |
getVersionById() |
Returns an entry version by its ID. | craft\web\twig\variables\EntryRevisions |
getVersionsByEntryId() |
Returns entry versions by an entry ID. | craft\web\twig\variables\EntryRevisions |
Method Details
getDraftById()
public method
#
Returns an entry draft by its offset.
public craft\models\EntryDraft, null getDraftById ( \craft\web\twig\variables\int $draftId )
$draftId |
integer |
getDraftsByEntryId()
public method
#
Returns entry drafts by an entry ID.
public craft\models\EntryDraft[] getDraftsByEntryId ( \craft\web\twig\variables\int $entryId, \craft\web\twig\variables\string $siteHandle = null )
$entryId |
integer | |
$siteHandle |
string, null | |
throws | yii\base\Exception | if|null $siteHandle is invalid |
---|
getEditableDraftsByEntryId()
public method
#
Returns the drafts of a given entry that are editable by the current user.
public craft\models\EntryDraft[] getEditableDraftsByEntryId ( \craft\web\twig\variables\int $entryId, \craft\web\twig\variables\string $siteHandle = null )
$entryId |
integer | |
$siteHandle |
string, null | |
throws | yii\base\Exception | if|null $siteHandle is invalid |
---|
getVersionById()
public method
#
Returns an entry version by its ID.
public craft\models\EntryVersion, null getVersionById ( \craft\web\twig\variables\int $versionId )
$versionId |
integer |
getVersionsByEntryId()
public method
#
Returns entry versions by an entry ID.
public craft\models\EntryVersion[] getVersionsByEntryId ( \craft\web\twig\variables\int $entryId, \craft\web\twig\variables\string $siteHandle )
$entryId |
integer | |
$siteHandle |
string | |
throws | yii\base\Exception | if $siteHandle is invalid |
---|