PHP Class Flarum\Core\DiscussionState

Stores information about how much of a discussion a user has read. Can also be used to store other information, if the appropriate columns are added to the database, like a user's subscription status for a discussion.
Inheritance: extends Flarum\Database\AbstractModel, use trait Flarum\Core\Support\EventGeneratorTrait
Datei anzeigen Open project: flarum/core

Protected Properties

Property Type Description
$dates
$table

Public Methods

Method Description
discussion ( ) : BelongsTo Define the relationship with the discussion that this state is for.
read ( integer $number ) Mark the discussion as being read up to a certain point. Raises the DiscussionWasRead event.
user ( ) : BelongsTo Define the relationship with the user that this state is for.

Protected Methods

Method Description
setKeysForSaveQuery ( Builder $query ) : Builder Set the keys for a save update query.

Method Details

discussion() public method

Define the relationship with the discussion that this state is for.
public discussion ( ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

read() public method

Mark the discussion as being read up to a certain point. Raises the DiscussionWasRead event.
public read ( integer $number )
$number integer

setKeysForSaveQuery() protected method

Set the keys for a save update query.
protected setKeysForSaveQuery ( Builder $query ) : Builder
$query Illuminate\Database\Eloquent\Builder
return Illuminate\Database\Eloquent\Builder

user() public method

Define the relationship with the user that this state is for.
public user ( ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

Property Details

$dates protected_oe property

protected $dates

$table protected_oe property

protected $table