HasSponsor
Trait HasSponsor.
Table of Contents
Methods
- disableSponsor() : void
- enableSponsor() : void
- getRandomSponsoredItems() : Collection
- getSponsoredItem() : Content|null
- isSponsor() : bool
- sponsor() : bool
- unsponsor() : bool
Methods
disableSponsor()
public
disableSponsor(Content $content) : void
Parameters
- $content : Content
enableSponsor()
public
enableSponsor(Content $content) : void
Parameters
- $content : Content
getRandomSponsoredItems()
public
getRandomSponsoredItems(User $context, int $limit[, array<string|int, mixed>|null $loadedItemIds = null ]) : Collection
Parameters
- $context : User
- $limit : int
- $loadedItemIds : array<string|int, mixed>|null = null
Return values
CollectiongetSponsoredItem()
public
getSponsoredItem(array<string|int, mixed> $notInIds[, int|null $sponsorStart = null ][, array<string|int, mixed> $with = [] ]) : Content|null
Parameters
- $notInIds : array<string|int, mixed>
- $sponsorStart : int|null = null
- $with : array<string|int, mixed> = []
Return values
Content|nullisSponsor()
public
isSponsor(Content $model) : bool
Parameters
- $model : Content
Tags
Return values
boolsponsor()
public
sponsor(User $context, int $id, int $sponsor) : bool
Parameters
- $context : User
- $id : int
- $sponsor : int
Tags
Return values
boolunsponsor()
public
unsponsor(User $context, int $id) : bool
Parameters
- $context : User
- $id : int