class PostPolicy extends AbstractPolicy

Properties

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

Methods

subscribe(Dispatcher $events)

No description

bool|void
getPermission(GetPermission $event)

No description

__construct(SettingsRepositoryInterface $settings, Dispatcher $events)

No description

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

No description

find(User $actor, Builder $query)

No description

bool|null
edit(User $actor, Post $post)

No description

bool|null
hide(User $actor, Post $post)

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, Dispatcher $events)

Parameters

SettingsRepositoryInterface $settings
Dispatcher $events

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

Parameters

User $actor
string $ability
Post $post

Return Value

bool|null

find(User $actor, Builder $query)

Parameters

User $actor
Builder $query

bool|null edit(User $actor, Post $post)

Parameters

User $actor
Post $post

Return Value

bool|null

bool|null hide(User $actor, Post $post)

Parameters

User $actor
Post $post

Return Value

bool|null