AdvertPlace
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait, TranslationCollectionTrait
AbstractYes
Tags
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
$activated
protected
bool
$activated
= false
Attributes
- #[Column]
- $name: 'activated'
- $type: 'boolean'
$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]
$translations
protected
Collection<int, TTranslation>
$translations
$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
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActivated()
public
getActivated() : bool
Return values
boolgetAllTraits()
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|nullgetAttributeId()
public
getAttributeId() : string|null
Return values
string|nullgetHeight()
public
getHeight() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getWidth()
public
getWidth() : string|null
Return values
string|nullisActivated()
public
isActivated() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetActivated()
public
setActivated(bool $activated) : $this
Parameters
- $activated : bool
Return values
$thissetAttributeClass()
public
setAttributeClass(string|null $attributeClass) : $this
Parameters
- $attributeClass : string|null
Return values
$thissetAttributeId()
public
setAttributeId(string|null $attributeId) : $this
Parameters
- $attributeId : string|null
Return values
$thissetHeight()
public
setHeight(string|null $height) : $this
Parameters
- $height : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetWidth()
public
setWidth(string|null $width) : $this
Parameters
- $width : string|null
Return values
$thistranslationCollectionInit()
public
translationCollectionInit() : void
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>