MetaFox

HasSetState

Trait HasSetState.

Tags
mixin

Factory

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

Methods

fakeRandomId()

public fakeRandomId( $userId,  $limit) : mixed
Parameters
$userId :
$limit :
Tags
deprecated

forOwner()

public forOwner(User $owner) : $this
Parameters
$owner : User
Return values
$this

pickOtherUserId()

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'

randomUserId()

public randomUserId() : int
Return values
int

sampleFile()

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|StorageFile

setCategories()

public setCategories([array<string|int, mixed> $categories = [] ]) : static
Parameters
$categories : array<string|int, mixed> = []
Return values
static

setCustomPrivacy()

public setCustomPrivacy([array<string|int, mixed> $list = [] ]) : $this
Parameters
$list : array<string|int, mixed> = []
Return values
$this

setOwner()

public setOwner(User $user) : $this
Parameters
$user : User
Return values
$this

setRandomPrivacy()

public setRandomPrivacy() : $this
Return values
$this

setUserAndOwner()

public setUserAndOwner(User $user[, User|null $owner = null ]) : $this
Parameters
$user : User
$owner : User|null = null
Return values
$this

        
On this page

Search results