class DiscussionPolicy extends AbstractPolicy

Properties

protected $model <p>{@inheritdoc}</p>
protected SettingsRepositoryInterface $settings
protected Gate $gate
protected Dispatcher $events

Methods

subscribe(Dispatcher $events)

No description

bool|void
getPermission(GetPermission $event)

No description

__construct(SettingsRepositoryInterface $settings, Gate $gate, Dispatcher $events)

No description

bool|null
can(User $actor, string $ability)

No description

find(User $actor, Builder $query)

No description

bool|null
rename(User $actor, Discussion $discussion)

No description

bool|null
hide(User $actor, Discussion $discussion)

No description

Details

subscribe(Dispatcher $events)

Parameters

Dispatcher $events

bool|void getPermission(GetPermission $event)

Parameters

GetPermission $event

Return Value

bool|void

scopeModelVisibility(ScopeModelVisibility $event)

Parameters

ScopeModelVisibility $event

__construct(SettingsRepositoryInterface $settings, Gate $gate, Dispatcher $events)

Parameters

SettingsRepositoryInterface $settings
Gate $gate
Dispatcher $events

bool|null can(User $actor, string $ability)

Parameters

User $actor
string $ability

Return Value

bool|null

find(User $actor, Builder $query)

Parameters

User $actor
Builder $query

bool|null rename(User $actor, Discussion $discussion)

Parameters

User $actor
Discussion $discussion

Return Value

bool|null

bool|null hide(User $actor, Discussion $discussion)

Parameters

User $actor
Discussion $discussion

Return Value

bool|null