class DiscussionPolicy extends AbstractPolicy
Constants
GLOBAL |
|
ALLOW |
|
DENY |
|
FORCE_ALLOW |
|
FORCE_DENY |
|
Properties
protected SettingsRepositoryInterface | $settings |
Methods
string|void
from AbstractPolicy
string|void|null
sanitizeResult(mixed $result)
<p>Allows <code>true</code> to be used in place of <code>->allow()</code>, and <code>false</code> instead of <code>->deny()</code> This allows more concise and intuitive code, by returning boolean statements:.</p>
from AbstractPolicy
Details
in AbstractPolicy
at
line 22
protected
allow()
in AbstractPolicy
at
line 27
protected
deny()
in AbstractPolicy
at
line 32
protected
forceAllow()
in AbstractPolicy
at
line 37
protected
forceDeny()
in AbstractPolicy
at
line 45
string|void
checkAbility(User $actor, string $ability, $instance)
in AbstractPolicy
at
line 76
string|void|null
sanitizeResult(mixed $result)
<p>Allows <code>true</code> to be used in place of <code>->allow()</code>, and <code>false</code> instead of <code>->deny()</code> This allows more concise and intuitive code, by returning boolean statements:.</p>
<p>WITHOUT THIS: `return SOME_BOOLEAN_LOGIC ? $this->allow() : $this->deny();</p> <p>WITH THIS: `return SOME_BOOLEAN_LOGIC;</p>