AdvertFollower
extends AdvertFollower
in package
Tags
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
- #[EntityOf]
- \App\UI\Front\Bazaar\Models\Entities\Advert::class
- #[JoinColumn]
- $name: 'cms_mod_bazaar_adverts_advert_id'
- $referencedColumnName: 'advert_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Front\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
- #[EntityOf]
- \App\UI\Front\System\Models\Entities\User::class
- #[JoinColumn]
- $name: 'cms_system_users_user_id'
- $referencedColumnName: 'user_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Front\System\Models\Entities\User::class
$userId
protected
int
$userId
= 0
Attributes
- #[Column]
- $name: 'cms_system_users_user_id'
- $type: 'integer'
- $options: ['unsigned' => true]
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|nullgetAdvertId()
public
getAdvertId() : int|null
Return values
int|nullgetAllTraits()
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>getId()
public
getId() : int|null
Return values
int|nullgetOwnerUserId()
Returns the id of the user who created the record; `null` for an unknown or anonymous owner.
public
getOwnerUserId() : int|null
Return values
int|nullgetUser()
public
getUser() : User|null
Return values
User|nullgetUserId()
public
getUserId() : int
Return values
intisPersisted()
public
isPersisted() : bool
Return values
boolsetAdvert()
public
setAdvert(TAdvert|null $advert) : $this
Parameters
- $advert : TAdvert|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetUser()
public
setUser(User|null $user) : self
Parameters
- $user : User|null
Return values
selfsetUserId()
public
setUserId(int $userId) : $this
Parameters
- $userId : int
Return values
$thisgetTraitsRecursive()
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>