Метод |
Описание |
|
boot ( ) : void |
Boot the model. |
|
comments ( ) : Illuminate\Database\Eloquent\Relations\HasMany |
Define the relationship with the discussion's publicly-visible comments. |
|
getModifiedPosts ( ) : array |
Get the posts that have been modified during this request. |
|
hide ( User $actor = null ) |
Hide the discussion. |
|
lastPost ( ) : BelongsTo |
Define the relationship with the discussion's last post. |
|
lastUser ( ) : BelongsTo |
Define the relationship with the discussion's most recent author. |
|
mergePost ( Flarum\Core\Post\MergeableInterface $post ) : Post |
Save a post, attempting to merge it with the discussion's last post. |
|
participants ( ) : Builder |
Query the discussion's participants (a list of unique users who have
posted in the discussion). |
|
posts ( ) : Illuminate\Database\Eloquent\Relations\HasMany |
Define the relationship with the discussion's posts. |
|
postsVisibleTo ( User $user ) : Illuminate\Database\Eloquent\Relations\HasMany |
Define the relationship with the discussion's posts, but only ones which
are visible to the given user. |
|
readers ( ) : BelongsTo |
Define the relationship with the discussion's readers. |
|
refreshCommentsCount ( ) |
Refresh the discussion's comments count. |
|
refreshLastPost ( ) |
Refresh a discussion's last post details. |
|
refreshParticipantsCount ( ) |
Refresh the discussion's participants count. |
|
rename ( string $title ) |
Rename the discussion. Raises the DiscussionWasRenamed event. |
|
restore ( ) |
Restore the discussion. |
|
setLastPost ( Post $post ) |
Set the discussion's last post details. |
|
setStartPost ( Post $post ) |
Set the discussion's start post details. |
|
setStateUser ( User $user ) |
Set the user for which the state relationship should be loaded. |
|
start ( string $title, User $user ) : static |
Start a new discussion. Raises the DiscussionWasStarted event. |
|
startPost ( ) : BelongsTo |
Define the relationship with the discussion's first post. |
|
startUser ( ) : BelongsTo |
Define the relationship with the discussion's author. |
|
state ( User $user = null ) : Illuminate\Database\Eloquent\Relations\HasOne |
Define the relationship with the discussion's state for a particular
user. |
|
stateFor ( User $user ) : DiscussionState |
Get the state model for a user, or instantiate a new one if it does not
exist. |
|