ContentReviewCMSExtension
class ContentReviewCMSExtension extends LeftAndMainExtension (View source)
CMSPageEditController extension to receive the additional action button from SiteTreeContentReview::updateCMSActions()
Traits
Properties
protected | object | $owner | The object this extension is applied to. |
from Extension |
Methods
Called when this extension is added to a particular class
Temporarily modify the owner. The original owner is ensured to be restored
Clear the current owner, and restore extension to the state prior to the last setOwner()
Helper method to strip eval'ed arguments from a string that's passed to DataObject::$extensions or Object::add_extension().
Checks the user has been granted special permission to review the content of the page if not fallback to canEdit() permission.
Return a handler for "content due for review" forms, according to the given object ID
Check if the current request has a X-Formschema-Request header set.
Generate schema for the given form based on the X-Formschema-Request header value
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(object $owner)
Set the owner of this extension.
mixed
withOwner(mixed $owner, callable $callback, array $args = [])
Temporarily modify the owner. The original owner is ensured to be restored
clearOwner()
Clear the current owner, and restore extension to the state prior to the last setOwner()
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 that's passed to DataObject::$extensions or Object::add_extension().
init()
No description
accessedCMS()
No description
augmentNewSiteTreeItem($item)
No description
protected bool
isContentReviewable(DataObject $record, Member|null $user = null)
Checks the user has been granted special permission to review the content of the page if not fallback to canEdit() permission.
Form|null
ReviewContentForm(HTTPRequest $request)
URL handler for the "content due for review" form
Form|null
getReviewContentForm(int $id)
Return a handler for "content due for review" forms, according to the given object ID
DBHTMLText|HTTPResponse|null
savereview(array $data, Form $form)
Action handler for processing the submitted content review
protected ReviewContentHandler
getReviewContentHandler()
Return a handler or reviewing content
protected SiteTree
findRecord(array $data)
Find the page this form is updating
protected bool
getSchemaRequested()
Check if the current request has a X-Formschema-Request header set.
Used by conditional logic that responds to validation results
protected HTTPResponse
getSchemaResponse(string $schemaID, Form $form = null, ValidationResult $errors = null, array $extraData = [])
Generate schema for the given form based on the X-Formschema-Request header value