CoolCMS API

AdvertPlace extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait, TranslationCollectionTrait

AbstractYes
Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'advertPlace'

Table of Contents

Interfaces

IdentifiableInterface
Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).

Properties

$activated  : bool
$attributeClass  : string|null
$attributeId  : string|null
$height  : string|null
$id  : int|null
$translations  : Collection<int, TTranslation>
$width  : string|null

Methods

__construct()  : mixed
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActivated()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getAttributeClass()  : string|null
getAttributeId()  : string|null
getHeight()  : string|null
getId()  : int|null
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
getWidth()  : string|null
isActivated()  : bool
isPersisted()  : bool
removeTranslation()  : $this
setActivated()  : $this
setAttributeClass()  : $this
setAttributeId()  : $this
setHeight()  : $this
setId()  : $this
setTranslations()  : $this
setWidth()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$attributeClass

protected string|null $attributeClass = null
Attributes
#[Column]
$name: 'attribute_class'
$type: 'string'
$length: 50
$nullable: true

$attributeId

protected string|null $attributeId = null
Attributes
#[Column]
$name: 'attribute_id'
$type: 'string'
$length: 50
$nullable: true

$height

protected string|null $height = null
Attributes
#[Column]
$name: 'height'
$type: 'string'
$length: 15
$nullable: true

$id

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

$width

protected string|null $width = null
Attributes
#[Column]
$name: 'width'
$type: 'string'
$length: 15
$nullable: true

Methods

__construct()

public __construct([int|null $id = null ][, string|null $attributeClass = null ][, string|null $attributeId = null ][, string|null $width = null ][, string|null $height = null ][, bool $activated = false ]) : mixed
Parameters
$id : int|null = null
$attributeClass : string|null = null
$attributeId : string|null = null
$width : string|null = null
$height : string|null = null
$activated : 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

getActivated()

public getActivated() : bool
Return values
bool

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>

getAttributeClass()

public getAttributeClass() : string|null
Return values
string|null

getAttributeId()

public getAttributeId() : string|null
Return values
string|null

getHeight()

public getHeight() : string|null
Return values
string|null

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>

getWidth()

public getWidth() : string|null
Return values
string|null

isActivated()

public isActivated() : bool
Return values
bool

removeTranslation()

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

setActivated()

public setActivated(bool $activated) : $this
Parameters
$activated : bool
Return values
$this

setAttributeClass()

public setAttributeClass(string|null $attributeClass) : $this
Parameters
$attributeClass : string|null
Return values
$this

setAttributeId()

public setAttributeId(string|null $attributeId) : $this
Parameters
$attributeId : string|null
Return values
$this

setHeight()

public setHeight(string|null $height) : $this
Parameters
$height : string|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
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

setWidth()

public setWidth(string|null $width) : $this
Parameters
$width : string|null
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