Version
class Version extends ConcreteObject implements ObjectInterface, ObjectInterface (View source)
Traits
Properties
$error | from ConcreteObject | ||
int|string deprecated | $cvID | ||
bool|int|string deprecated | $cvIsApproved | ||
bool|int|string deprecated | $cvIsNew | ||
string|null | $cvHandle | The collection version handle. |
|
string|null deprecated | $cvName | ||
string|null | $cvDescription | The collection version description. |
|
string|null deprecated | $cvDateCreated | ||
string|null | $cvDatePublic | The date/time when this collection version was made public. |
|
int|string | $pTemplateID | The ID of the page template. |
|
int|string|null deprecated | $cvAuthorUID | ||
int|string|null deprecated | $cvApproverUID | ||
string|null deprecated | $cvComments | ||
int|string | $pThemeID | The ID of the page theme. |
|
string | $pThemeSkinIdentifier | The identifier of any custom skin attached to this page version. |
|
string|null deprecated | $cvPublishDate | ||
string|null deprecated | $cvPublishEndDate | ||
string|null deprecated | $cvDateApproved | ||
int deprecated | $cID | ||
protected | $attributes | ||
$layoutStyles | |||
protected bool|null | $isMostRecent | Is this the most recent version? |
|
protected array|null | $customAreaStyles | The custom area style IDs. |
Methods
No description
No description
Sets the attribute of a user info object to the specified value, and saves it in the database.
No description
No description
No description
No description
Clear the cache for this collection.
Get a Version instance given the Collection and a version identifier.
Is this version approved?
Is this version approved and in the publish interval?
Get the scheduled date/time when the collection is published: start.
Get the scheduled date/time when the collection is published: end.
Is this the most recent version?
Is this a new version?
Get the collection version ID.
Get the collection ID.
The collection version name.
Get the collection version comments.
Get the ID of the user that created this collection version.
Get the ID of the user that approved this collection version.
Get the name of the user that approved this collection version.
Get the name of the user that approved this collection version.
Get the custom area style IDs.
Get the date/time when the collection version was created.
Get the date the collection version was approved.
Set the collection version comments.
Set the scheduled date/time when the collection is published: start.
Set the scheduled date/time when the collection is published: end.
Set the scheduled date/time when the collection is published.
Create a new version for the same collection as this collection version.
Discard my most recent edit that is pending.
Check if this collection version can be discarded.
Mark this collection version as not new.
No description
Mark this collection version as not approved.
Delete this version and its related data (blocks, attributes, custom styles, ...).
Make sure that other collection versions aren't approved and valid at the same time as this version.
Details
loadError($error)
No description
isError()
No description
getError()
No description
setPropertiesFromArray($arr)
No description
static
camelcase($file)
No description
static
uncamelcase($string)
No description
CategoryInterface
getObjectAttributeCategory()
No description
AttributeValueInterface|null
getAttributeValueObject(AttributeKeyInterface|string $ak, bool $createIfNotExists = false)
No description
getAttribute($ak, $mode = false)
No description
Value
getAttributeValue($ak)
No description
clearAttribute($ak, bool $doReindexImmediately = true)
No description
Value
setAttribute($ak, mixed $value, bool $doReindexImmediately = true)
Sets the attribute of a user info object to the specified value, and saves it in the database.
getPermissionObjectIdentifier()
No description
getPermissionResponseClassName()
No description
getPermissionAssignmentClassName()
No description
getPermissionObjectKeyCategoryHandle()
No description
refreshCache()
Clear the cache for this collection.
static Version
get(Collection $c, int|string $cvID)
Get a Version instance given the Collection and a version identifier.
bool|int|string
isApproved()
Is this version approved?
bool
isApprovedNow($when = null)
Is this version approved and in the publish interval?
string|null
getPublishDate()
Get the scheduled date/time when the collection is published: start.
string|null
getPublishEndDate()
Get the scheduled date/time when the collection is published: end.
bool
isMostRecent()
Is this the most recent version?
bool|number|string
isNew()
Is this a new version?
int|string
getVersionID()
Get the collection version ID.
int
getCollectionID()
Get the collection ID.
string|null
getVersionName()
The collection version name.
string|null
getVersionComments()
Get the collection version comments.
int|string|null
getVersionAuthorUserID()
Get the ID of the user that created this collection version.
int|string|null
getVersionApproverUserID()
Get the ID of the user that approved this collection version.
string|null|false
getVersionAuthorUserName()
Get the name of the user that approved this collection version.
string|null|false
getVersionApproverUserName()
Get the name of the user that approved this collection version.
array
getCustomAreaStyles()
Get the custom area style IDs.
string|null
getVersionDateCreated()
Get the date/time when the collection version was created.
string|null
getVersionDateApproved()
Get the date the collection version was approved.
setComment(string $comment)
Set the collection version comments.
setPublishDate(string|DateTime|int|null $publishDate)
Set the scheduled date/time when the collection is published: start.
setPublishEndDate(string|DateTime|int|null $publishEndDate)
Set the scheduled date/time when the collection is published: end.
setPublishInterval(string|DateTime|int|null $startDateTime, string|DateTime|int|null $endDateTime)
Set the scheduled date/time when the collection is published.
Version
createNew(string $versionComments)
Create a new version for the same collection as this collection version.
approve(bool $doReindexImmediately = true, string|DateTime|int|null $cvPublishDate = null, string|DateTime|int|null $cvPublishEndDate = null, bool $keepOtherScheduling = false)
Approve this collection version.
discard()
Discard my most recent edit that is pending.
bool
canDiscard()
Check if this collection version can be discarded.
removeNewStatus()
Mark this collection version as not new.
private void
updateCollectionDateModified()
No description
void
deny()
Mark this collection version as not approved.
delete()
Delete this version and its related data (blocks, attributes, custom styles, ...).
private
avoidApprovalOverlapping()
Make sure that other collection versions aren't approved and valid at the same time as this version.