PHP Class Flarum\Core\Post\CommentPost

Inheritance: extends Flarum\Core\Post
Datei anzeigen Open project: flarum/core Class Usage Examples

Public Properties

Property Type Description
$type

Protected Properties

Property Type Description
$formatter Flarum\Formatter\Formatter The text formatter instance.

Public Methods

Method Description
getContentAttribute ( string $value ) : string Unparse the parsed content.
getContentHtmlAttribute ( string $value ) : string Get the content rendered as HTML.
getFormatter ( ) : Formatter Get the text formatter instance.
getParsedContentAttribute ( ) : string Get the parsed/raw content.
hide ( User $actor = null ) Hide the post.
reply ( integer $discussionId, string $content, integer $userId, string $ipAddress ) : static Create a new instance in reply to a discussion.
restore ( ) Restore the post.
revise ( string $content, User $actor ) Revise the post's content.
setContentAttribute ( string $value ) Parse the content before it is saved to the database.
setFormatter ( Formatter $formatter ) Set the text formatter instance.

Method Details

getContentAttribute() public method

Unparse the parsed content.
public getContentAttribute ( string $value ) : string
$value string
return string

getContentHtmlAttribute() public method

Get the content rendered as HTML.
public getContentHtmlAttribute ( string $value ) : string
$value string
return string

getFormatter() public static method

Get the text formatter instance.
public static getFormatter ( ) : Formatter
return Flarum\Formatter\Formatter

getParsedContentAttribute() public method

Get the parsed/raw content.

hide() public method

Hide the post.
public hide ( User $actor = null )
$actor Flarum\Core\User

reply() public static method

Create a new instance in reply to a discussion.
public static reply ( integer $discussionId, string $content, integer $userId, string $ipAddress ) : static
$discussionId integer
$content string
$userId integer
$ipAddress string
return static

restore() public method

Restore the post.
public restore ( )

revise() public method

Revise the post's content.
public revise ( string $content, User $actor )
$content string
$actor Flarum\Core\User

setContentAttribute() public method

Parse the content before it is saved to the database.
public setContentAttribute ( string $value )
$value string

setFormatter() public static method

Set the text formatter instance.
public static setFormatter ( Formatter $formatter )
$formatter Flarum\Formatter\Formatter

Property Details

$formatter protected_oe static_oe property

The text formatter instance.
protected static Formatter,Flarum\Formatter $formatter
return Flarum\Formatter\Formatter

$type public_oe static_oe property

public static $type