class PostPolicy extends AbstractPolicy

Constants

GLOBAL

ALLOW

DENY

FORCE_ALLOW

FORCE_DENY

Properties

protected SettingsRepositoryInterface $settings

Methods

allow()

No description

deny()

No description

forceAllow()

No description

forceDeny()

No description

bool|void
checkAbility(User $actor, string $ability, $instance)

No description

__construct(SettingsRepositoryInterface $settings)

No description

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

No description

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

No description

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

No description

Details

protected allow()

protected deny()

protected forceAllow()

protected forceDeny()

bool|void checkAbility(User $actor, string $ability, $instance)

Parameters

User $actor
string $ability
$instance

Return Value

bool|void

__construct(SettingsRepositoryInterface $settings)

Parameters

SettingsRepositoryInterface $settings

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

Parameters

User $actor
string $ability
Post $post

Return Value

bool|null

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