SilverStripe\Comments\Controllers\CommentingController
Synopsis
class CommentingController
extends Controller
{
- // members
- private static array $allowed_actions = ;
- private static array $url_handlers = ;
- private static array $required_fields = ;
- private string $parentClass = '';
- private DataObject $ownerRecord;
- private Controller $ownerController;
- protected $fallbackReturnURL;
- // methods
- public void setParentClass()
- public string getParentClass()
- public string encodeClassName()
- public string decodeClassName()
- public void setOwnerRecord()
- public DataObject getOwnerRecord()
- public void setOwnerController()
- public Controller getOwnerController()
- public mixed getOption()
- public array getOptions()
- public string Link()
- public DBHTMLText rss()
- public RSSFeed getFeed()
- public void delete()
- public void spam()
- public void ham()
- public void approve()
- private DBHTMLText|HTTPResponse|false renderChangedCommentState()
- public Comment|false getComment()
- public Form ReplyForm()
- public void reply()
- public Form CommentsForm()
- public HTTPResponse|false redirectBack()
Hierarchy
Extends
- SilverStripe\Control\Controller
Members
private
-
$allowed_actions
{@inheritDoc} - $ownerController
—
SilverStripe\Control\Controller
Parent controller record - $ownerRecord
—
SilverStripe\ORM\DataObject
The record this commenting form is for - $parentClass
—
string
Parent class this commenting form is for - $required_fields
—
array
Fields required for this form -
$url_handlers
{@inheritDoc}
protected
- $fallbackReturnURL
—
string
Backup url to return to
Methods
private
- renderChangedCommentState() — Redirect back to referer if available, ensuring that only site URLs are allowed to avoid phishing. If it's an AJAX request render the comment in it's new state
public
- CommentsForm() — Post a comment form
- Link() — Workaround for generating the link to this controller
- ReplyForm() — Create a reply form for a specified comment
- approve() — Marks a given {@link Comment} as approved.
- decodeClassName() — Decode an "encoded" fully qualified class name back to its original
- delete() — Deletes a given {@link Comment} via the URL.
- encodeClassName() — Encode a fully qualified class name to a URL-safe version
- getComment() — Returns the comment referenced in the URL (by ID). Permission checking should be done in the callee.
- getFeed() — Return an RSSFeed of comments for a given set of comments or all comments on the website.
- getOption() — Get the commenting option for the current state
- getOptions() — Returns all the commenting options for the current instance.
- getOwnerController() — Get the parent controller
- getOwnerRecord() — Get the record
- getParentClass() — Get the parent class name used
- ham() — Marks a given {@link Comment} as ham (not spam).
- redirectBack()
- reply() — Request handler for reply form.
- rss() — Outputs the RSS feed of comments
- setOwnerController() — Set the parent controller
- setOwnerRecord() — Set the record this controller is working on
- setParentClass() — Set the parent class name to use
- spam() — Marks a given {@link Comment} as spam. Removes the comment from display