class PostPolicy extends AbstractPolicy

Properties

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

Methods

subscribe(Dispatcher $events)

No description

bool|null
getPermission(GetPermission $event)

No description

__construct(SettingsRepositoryInterface $settings, Gate $gate)

No description

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

No description

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

No description

bool
discussionAllows(User $actor, string $ability, Post $post)

No description

Details

subscribe(Dispatcher $events)

Parameters

Dispatcher $events

bool|null getPermission(GetPermission $event)

Parameters

GetPermission $event

Return Value

bool|null

scopeModelVisibility(ScopeModelVisibility $event)

Parameters

ScopeModelVisibility $event

__construct(SettingsRepositoryInterface $settings, Gate $gate)

Parameters

SettingsRepositoryInterface $settings
Gate $gate

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

Parameters

User $actor
string $ability
Post $post

Return Value

bool|null

scopePostVisibility(ScopePostVisibility $event)

Parameters

ScopePostVisibility $event

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

Parameters

User $actor
Post $post

Return Value

bool|null

protected bool discussionAllows(User $actor, string $ability, Post $post)

Parameters

User $actor
string $ability
Post $post

Return Value

bool