HasSetState
Trait HasSetState.
Tags
Table of Contents
Properties
- $lastUserId : mixed
- $sampleFiles : Collection
- $userIds : Collection
Methods
- addComments() : mixed
- configure() : mixed
- fakeRandomId() : mixed
- forItem() : $this
- forOwner() : $this
- forUser() : $this
- pickOtherUserId() : mixed
- pickRandomContent() : Content|null
- randomUserId() : int
- sampleFile() : null|StorageFile
- seed() : $this
- setCategories() : static
- setCustomPrivacy() : $this
- setItem() : static
- setOwner() : $this
- setRandomPrivacy() : $this
- setUser() : $this
- setUserAndOwner() : $this
Properties
$lastUserId
private
static mixed
$lastUserId
= 0
$sampleFiles
private
static Collection
$sampleFiles
$userIds
private
static Collection
$userIds
Methods
addComments()
public
addComments() : mixed
configure()
public
configure() : mixed
fakeRandomId()
public
fakeRandomId( $userId, $limit) : mixed
Parameters
Tags
forItem()
public
forItem(Entity $item) : $this
Parameters
- $item : Entity
Return values
$thisforOwner()
public
forOwner(User $owner) : $this
Parameters
- $owner : User
Return values
$thisforUser()
public
forUser(User $user) : $this
Parameters
- $user : User
Return values
$thispickOtherUserId()
public
pickOtherUserId(int $id, string $otherModelName[, string $column1 = 'owner_id' ][, string $column2 = 'user_id' ]) : mixed
Parameters
- $id : int
- $otherModelName : string
- $column1 : string = 'owner_id'
- $column2 : string = 'user_id'
pickRandomContent()
public
pickRandomContent() : Content|null
Return values
Content|nullrandomUserId()
public
randomUserId() : int
Return values
intsampleFile()
public
sampleFile(string|array<string|int, mixed> $type[, string $name = '*' ][, int $ratio = 100 ]) : null|StorageFile
Parameters
- $type : string|array<string|int, mixed>
- $name : string = '*'
- $ratio : int = 100
Return values
null|StorageFileseed()
public
seed() : $this
Return values
$thissetCategories()
public
setCategories([array<string|int, mixed> $categories = [] ]) : static
Parameters
- $categories : array<string|int, mixed> = []
Return values
staticsetCustomPrivacy()
public
setCustomPrivacy([array<string|int, mixed> $list = [] ]) : $this
Parameters
- $list : array<string|int, mixed> = []
Return values
$thissetItem()
public
setItem(Content $item) : static
Parameters
- $item : Content
Return values
staticsetOwner()
public
setOwner(User $user) : $this
Parameters
- $user : User
Return values
$thissetRandomPrivacy()
public
setRandomPrivacy() : $this
Return values
$thissetUser()
public
setUser(User $user) : $this
Parameters
- $user : User
Return values
$thissetUserAndOwner()
public
setUserAndOwner(User $user[, User|null $owner = null ]) : $this