CoolCMS API

TeamMember extends TeamMember
in package

Team member of a company ("Our team"): round portrait, name, job title and a short text.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_company_team_members'
#[TableAlias]
'teamMember'

Table of Contents

Properties

$companyId  : int
$deleted  : bool
$id  : int|null
$name  : string
$order  : int
$photoImageId  : int|null
$public  : bool
$translations  : Collection

Methods

__construct()  : mixed
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCompanyId()  : int
getDeleted()  : bool
getId()  : int|null
getName()  : string
getOrder()  : int
getPhotoImageId()  : int|null
getPublic()  : bool
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
isDeleted()  : bool
isPersisted()  : bool
isPublic()  : bool
removeTranslation()  : $this
setCompanyId()  : $this
setDeleted()  : $this
setId()  : $this
setName()  : $this
setOrder()  : $this
setPhotoImageId()  : $this
setPublic()  : $this
setTranslations()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$companyId

protected int $companyId = 0
Attributes
#[Column]
$name: 'company_id'
$type: 'integer'
$options: ['unsigned' => true]

$id

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

$name

protected string $name = ''
Attributes
#[Column]
$name: 'name'
$type: 'string'
$length: 255

$order

protected int $order = 0
Attributes
#[Column]
$name: '`order`'
$type: 'integer'
$options: ['unsigned' => true, 'default' => 0]

$photoImageId

protected int|null $photoImageId = null
Attributes
#[Column]
$name: 'photo_image_id'
$type: 'integer'
$options: ['unsigned' => true]
$nullable: true

$public

protected bool $public = true
Attributes
#[Column]
$name: 'public'
$type: 'boolean'

$translations

protected Collection $translations
Attributes
#[CollectionOf]
\App\UI\Admin\Company\Models\Entities\TeamMemberText::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\Company\Models\Entities\TeamMemberText::class
$mappedBy: 'parent'
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"

Methods

__construct()

public __construct([int|null $id = null ][, int $companyId = 0 ][, int|null $photoImageId = null ][, string $name = '' ][, int $order = 0 ][, bool $public = true ][, bool $deleted = false ]) : mixed
Parameters
$id : int|null = null
$companyId : int = 0
$photoImageId : int|null = null
$name : string = ''
$order : int = 0
$public : bool = true
$deleted : bool = false

addTranslation()

public addTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

callInitMethods()

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

public callInitMethods() : void

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>

getCompanyId()

public getCompanyId() : int
Return values
int

getDeleted()

public getDeleted() : bool
Return values
bool

getName()

public getName() : string
Return values
string

getOrder()

public getOrder() : int
Return values
int

getPhotoImageId()

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

getPublic()

public getPublic() : bool
Return values
bool

getTranslation()

public getTranslation(int $langId) : TTranslation|null
Parameters
$langId : int
Return values
TTranslation|null

getTranslations()

public getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>

isDeleted()

public isDeleted() : bool
Return values
bool

isPublic()

public isPublic() : bool
Return values
bool

removeTranslation()

public removeTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

setCompanyId()

public setCompanyId(int $companyId) : $this
Parameters
$companyId : int
Return values
$this

setDeleted()

public setDeleted(bool $deleted) : $this
Parameters
$deleted : bool
Return values
$this

setId()

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

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setOrder()

public setOrder(int $order) : $this
Parameters
$order : int
Return values
$this

setPhotoImageId()

public setPhotoImageId(int|null $photoImageId) : $this
Parameters
$photoImageId : int|null
Return values
$this

setPublic()

public setPublic(bool $public) : $this
Parameters
$public : bool
Return values
$this

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
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