CoolCMS API

AdvertFollower extends AdvertFollower
in package

Tags
extends
Attributes
#[AttributeOverrides]
[new \Doctrine\ORM\Mapping\AttributeOverride('userId', new \Doctrine\ORM\Mapping\Column(name: 'cms_system_users_user_id', type: 'integer', insertable: false, updatable: false, options: ['unsigned' => true]))]
#[Entity]
#[Table]
$name: 'cms_mod_bazaar_advert_followers'
#[TableAlias]
'advertFollower'

Table of Contents

Properties

$advert  : TAdvert|null
$id  : int|null
$user  : User|null
Following user (owns the column `cms_system_users_user_id`; `userId` is read-only).
$userId  : int

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAdvert()  : TAdvert|null
getAdvertId()  : int|null
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getId()  : int|null
getOwnerUserId()  : int|null
Returns the id of the user who created the record; `null` for an unknown or anonymous owner.
getUser()  : User|null
getUserId()  : int
isPersisted()  : bool
setAdvert()  : $this
setId()  : $this
setUser()  : self
setUserId()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$advert

protected TAdvert|null $advert = null
Attributes
#[JoinColumn]
$name: 'cms_mod_bazaar_adverts_advert_id'
$referencedColumnName: 'advert_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Bazaar\Models\Entities\Advert::class

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'advert_follower_id'
$type: 'bigint'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$user

Following user (owns the column `cms_system_users_user_id`; `userId` is read-only).

protected User|null $user = null
Attributes
#[ExternalReadonly]
#[JoinColumn]
$name: 'cms_system_users_user_id'
$referencedColumnName: 'user_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\System\Models\Entities\User::class

$userId

protected int $userId = 0
Attributes
#[Column]
$name: 'cms_system_users_user_id'
$type: 'integer'
$options: ['unsigned' => true]
#[ExternalReadonly]

Methods

__construct()

public __construct([int|null $id = null ][, int $userId = 0 ][, mixed $advert = null ]) : mixed
Parameters
$id : int|null = null
$userId : int = 0
$advert : mixed = null

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getAdvert()

public getAdvert() : TAdvert|null
Return values
TAdvert|null

getAdvertId()

public getAdvertId() : int|null
Return values
int|null

getAllTraits()

Returns all traits the class uses, including those used by parent classes and nested traits.

public getAllTraits() : array<string, string>
Return values
array<string, string>

getOwnerUserId()

Returns the id of the user who created the record; `null` for an unknown or anonymous owner.

public getOwnerUserId() : int|null
Return values
int|null

setAdvert()

public setAdvert(TAdvert|null $advert) : $this
Parameters
$advert : TAdvert|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setUserId()

public setUserId(int $userId) : $this
Parameters
$userId : int
Return values
$this

getTraitsRecursive()

Walks the trait list recursively and collects nested traits too.

private static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
$traits : array<string, string>
Return values
array<string, string>
On this page

Search results