class DiscussionPolicy 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)

No description

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

No description

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

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)

Parameters

User $actor
string $ability

Return Value

bool|null

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