SiteTreeContentReview
class SiteTreeContentReview extends DataExtension implements PermissionProvider (View source)
Set dates at which content needs to be reviewed and provide a report and emails to alert to content needing review.
Properties
protected | SS_Object | $owner | The object this extension is applied to. |
from Extension |
protected | DataObject | $ownerBaseClass | The base class that this extension was applied to; $this->owner must be one of these |
from Extension |
public | $class | from Extension | ||
string | $ContentReviewType | |||
int | $ReviewPeriodDays | |||
Date | $NextReviewDate | |||
string | $LastEditedByName | |||
string | $OwnerNames |
Methods
Called when this extension is added to a particular class
Helper method to strip eval'ed arguments from a string thats passed to DataObject::$extensions or Object::add_extension().
Update the database schema as required by this extension.
If the queued jobs module is installed, queue up the first job for 9am tomorrow morning (by default).
Define extra database fields
This function is used to provide modifications to the form in the CMS by the extension. By default, no changes are made. DataObject->getCMSFields().
This function is used to provide modifications to the form used for front end forms. DataObject->getFrontEndFields()
this function is used to provide modifications to the summary fields in CMS by the extension By default, the summaryField() of its owner will merge more fields defined in the extension's $extra_fields['summary_fields']
this function is used to provide modifications to the fields labels in CMS by the extension By default, the fieldLabels() of its owner will merge more fields defined in the extension's $extra_fields['field_labels']
Takes a list of groups and members and return a list of unique member.
Get the object that have the information about the content review settings. Either:
Get all Members that are Content Owners to this page. This includes checking group hierarchy and adding any direct users.
Creates a ContentReviewLog and connects it to this Page.
Advance review date to the next date based on review period or set it to null if there is no schedule. Returns true if date was required and false is content review is 'off'.
Details
__construct()
No description
static
add_to_class(string $class, string $extensionClass, mixed $args = null)
Called when this extension is added to a particular class
setOwner(SS_Object $owner, string $ownerBaseClass = null)
Set the owner of this extension.
clearOwner()
No description
SS_Object
getOwner()
Returns the owner of this extension.
static string
get_classname_without_arguments(string $extensionStr)
Helper method to strip eval'ed arguments from a string thats passed to DataObject::$extensions or Object::add_extension().
static
get_extra_config($class, $extension, $args)
No description
static
unload_extra_statics($class, $extension)
No description
validate(ValidationResult $validationResult)
Hook for extension-specific validation.
augmentSQL(SQLQuery $query)
Edit the given query object to support queries for this extension
augmentDatabase()
Update the database schema as required by this extension.
When duplicating a table's structure, remember to duplicate the create options as well. See Versioned->augmentDatabase for an example.
augmentWrite(array $manipulation)
Augment a write-record request.
onBeforeWrite()
Set the review data from the review period, if set.
onAfterWrite()
No description
onBeforeDelete()
No description
onAfterDelete()
No description
requireDefaultRecords()
If the queued jobs module is installed, queue up the first job for 9am tomorrow morning (by default).
populateDefaults()
No description
can($member)
No description
canEdit($member)
No description
canDelete($member)
No description
canCreate($member)
No description
array
extraStatics($class = null, $extension = null)
Define extra database fields
Return a map where the keys are db, has_one, etc, and the values are additional fields/relations to be defined.
updateCMSFields(FieldList $fields)
This function is used to provide modifications to the form in the CMS by the extension. By default, no changes are made. DataObject->getCMSFields().
Please consider using updateFormFields() to globally add formfields to the record. The method updateCMSFields() should just be used to add or modify tabs, or fields which are specific to the CMS-context.
Caution: Use FieldList->addFieldToTab() to add fields.
updateFrontEndFields(FieldList $fields)
This function is used to provide modifications to the form used for front end forms. DataObject->getFrontEndFields()
Caution: Use FieldList->push() to add fields.
updateCMSActions(FieldList $actions)
No description
updateSummaryFields(array $fields)
this function is used to provide modifications to the summary fields in CMS by the extension By default, the summaryField() of its owner will merge more fields defined in the extension's $extra_fields['summary_fields']
updateFieldLabels(array $labels)
this function is used to provide modifications to the fields labels in CMS by the extension By default, the fieldLabels() of its owner will merge more fields defined in the extension's $extra_fields['field_labels']
static array
get_schedule()
No description
static ArrayList
merge_owners(SS_List $groups, SS_List $members)
Takes a list of groups and members and return a list of unique member.
bool|DataObject
getOptions()
Get the object that have the information about the content review settings. Either:
- a SiteTreeContentReview decorated object
- the default SiteTree config
- false if this page have it's content review disabled
Will go through parents and root pages will use the site config if their setting is Inherit.
string
getOwnerNames()
No description
null|string
getEditorName()
No description
ArrayList
ContentReviewOwners()
Get all Members that are Content Owners to this page. This includes checking group hierarchy and adding any direct users.
ManyManyList
OwnerGroups()
No description
ManyManyList
OwnerUsers()
No description
updateSettingsFields(FieldList $fields)
No description
addReviewNote(Member $reviewer, string $message)
Creates a ContentReviewLog and connects it to this Page.
bool
advanceReviewDate()
Advance review date to the next date based on review period or set it to null if there is no schedule. Returns true if date was required and false is content review is 'off'.
bool
canBeReviewedBy(Member $member = null)
Check if a review is due by a member for this owner.
protected
setDefaultReviewDateForCustom()
No description
protected
setDefaultReviewDateForInherited()
No description
providePermissions()
Provide permissions to the CMS.
DataList
ReviewLogs()
No description
DataList
ContentReviewGroups()
No description
DataList
ContentReviewUsers()
No description