AdvertPlace
extends AdvertPlace
in package
uses
AdvertCollectionTrait
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_base_advert_places'
- #[TableAlias]
- 'advertPlace'
Table of Contents
Properties
- $activated : bool
- $advertRels : Collection<int, AdvertPlaceRel>
- $attributeClass : string|null
- $attributeId : string|null
- $height : string|null
- $id : int|null
- $translations : Collection<int, AdvertPlaceText>
- $width : string|null
Methods
- __construct() : mixed
- addAdvertRel() : $this
- addTranslation() : $this
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getActivated() : bool
- getAdvertRels() : Collection<int, TRel>
- getAdverts() : Collection<int, TAdvert>
- Returns the linked adverts, extracted from `advertRels`.
- 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
- setAdvertRels() : $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'
$advertRels
protected
Collection<int, AdvertPlaceRel>
$advertRels
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Base\Models\Entities\AdvertPlaceRel::class
- $mappedBy: 'advertPlace'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
- #[OrderBy]
- ['order' => 'ASC']
$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, AdvertPlaceText>
$translations
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Base\Models\Entities\AdvertPlaceText::class
- $mappedBy: 'parent'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
$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
addAdvertRel()
public
addAdvertRel(TRel $rel) : $this
Parameters
- $rel : TRel
Return values
$thisaddTranslation()
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
boolgetAdvertRels()
public
getAdvertRels() : Collection<int, TRel>
Return values
Collection<int, TRel>getAdverts()
Returns the linked adverts, extracted from `advertRels`.
public
getAdverts() : Collection<int, TAdvert>
Return values
Collection<int, TAdvert>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|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
$thissetAdvertRels()
public
setAdvertRels(Collection<int, TRel>|array<int, TRel> $advertRels) : $this
Parameters
- $advertRels : Collection<int, TRel>|array<int, TRel>
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>