EntryRevisionsVariable
- Type
- Class
- Namespace
- Craft
- Inherits
- Craft\EntryRevisionsVariable
- Since
- 1.0
Class EntryRevisionsVariable
See also http://craftcms.com
View source (opens new window)
# Public Methods
Method | Description |
---|---|
getDraftById() | Returns an entry draft by its offset. |
getDraftByOffset() | 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. |
getVersionByOffset() | Returns an entry version by its offset. |
getVersionsByEntryId() | Returns entry versions by an entry ID. |
# getDraftById()
Returns an entry draft by its offset.
View source (opens new window)
Arguments
$draftId
(integer (opens new window))
Returns
Signature
public Craft\EntryDraftModel, null getDraftById ( $draftId )
# getDraftByOffset()
Returns an entry draft by its offset.
View source (opens new window)
Arguments
$entryId
(integer (opens new window))$offset
(integer (opens new window))
Returns
Signature
public Craft\EntryDraftModel, null getDraftByOffset ( $entryId, $offset = 0 )
# getDraftsByEntryId()
Returns entry drafts by an entry ID.
View source (opens new window)
Arguments
$entryId
(integer (opens new window))$localeId
(string (opens new window))
Returns
Signature
public array getDraftsByEntryId ( $entryId, $localeId = null )
# getEditableDraftsByEntryId()
Returns the drafts of a given entry that are editable by the current user.
View source (opens new window)
Arguments
$entryId
(integer (opens new window))$localeId
(string (opens new window))
Returns
Signature
public array getEditableDraftsByEntryId ( $entryId, $localeId = null )
# getVersionById()
Returns an entry version by its ID.
View source (opens new window)
Arguments
$versionId
(integer (opens new window))
Returns
Signature
public Craft\EntryVersionModel, null getVersionById ( $versionId )
# getVersionByOffset()
Returns an entry version by its offset.
View source (opens new window)
Arguments
$entryId
(integer (opens new window))$offset
(integer (opens new window))
Returns
Signature
public Craft\EntryVersionModel, null getVersionByOffset ( $entryId, $offset = 0 )
# getVersionsByEntryId()
Returns entry versions by an entry ID.
View source (opens new window)
Arguments
$entryId
(integer (opens new window))$localeId
(string (opens new window))
Returns
Signature
public array getVersionsByEntryId ( $entryId, $localeId )