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
Afficher le fichier Open project: flarum/core

Protected Properties

Свойство Type Description
$dates
$table

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

discussion() public méthode

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

read() public méthode

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

setKeysForSaveQuery() protected méthode

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

user() public méthode

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

Property Details

$dates protected_oe property

protected $dates

$table protected_oe property

protected $table