ConversionRequestPolicy
in package
implements
ResourcePolicyInterface
Uses
HandlesAuthorization
Class ConversionRequestPolicy.
Tags
Table of Contents
Interfaces
Properties
- $type : string
Methods
- approveConversionRequest() : bool
- cancelConversionRequest() : bool
- conversionRateForCreate() : bool
- create() : bool
- createConversionRequest() : bool
- createForm() : bool
- delete() : bool
- deleteOwn() : bool
- denyConversionRequest() : bool
- enoughPointsForCreating() : bool
- update() : bool
- view() : bool
- viewAny() : bool
- viewDeniedReason() : bool
- viewOnProfilePage() : bool
- viewOwner() : bool
Properties
$type
protected
string
$type
= 'activitypoint_conversion_request'
Methods
approveConversionRequest()
public
approveConversionRequest(User $user, ConversionRequest $transaction) : bool
Parameters
- $user : User
- $transaction : ConversionRequest
Return values
boolcancelConversionRequest()
public
cancelConversionRequest(User $user, ConversionRequest $transaction) : bool
Parameters
- $user : User
- $transaction : ConversionRequest
Return values
boolconversionRateForCreate()
public
conversionRateForCreate([string $currency = Support::DEFAULT_CONVERSION_RATE_CURRENCY_TO_MONEY ]) : bool
Parameters
- $currency : string = Support::DEFAULT_CONVERSION_RATE_CURRENCY_TO_MONEY
Return values
boolcreate()
public
create(User $user[, User|null $owner = null ]) : bool
Parameters
Return values
boolcreateConversionRequest()
public
createConversionRequest(User $user, int $points) : bool
Parameters
- $user : User
- $points : int
Return values
boolcreateForm()
public
createForm(User $user) : bool
Parameters
- $user : User
Return values
booldelete()
public
delete(User $user[, Entity|null $resource = null ]) : bool
Parameters
Return values
booldeleteOwn()
public
deleteOwn(User $user[, Entity|null $resource = null ]) : bool
Parameters
Return values
booldenyConversionRequest()
public
denyConversionRequest(User $user, ConversionRequest $transaction) : bool
Parameters
- $user : User
- $transaction : ConversionRequest
Return values
boolenoughPointsForCreating()
public
enoughPointsForCreating(User $user, int $points) : bool
Parameters
- $user : User
- $points : int
Return values
boolupdate()
public
update(User $user[, Entity|null $resource = null ]) : bool
Parameters
Return values
boolview()
public
view(User $user, Entity $resource) : bool
Parameters
Return values
boolviewAny()
public
viewAny(User $user[, User|null $owner = null ]) : bool
Parameters
Return values
boolviewDeniedReason()
public
viewDeniedReason(User $user, ConversionRequest $transaction) : bool
Parameters
- $user : User
- $transaction : ConversionRequest
Return values
boolviewOnProfilePage()
public
viewOnProfilePage(User $user, User $owner) : bool
Parameters
Return values
boolviewOwner()
public
viewOwner(User $user[, User|null $owner = null ]) : bool