ServiceGroup
extends ServiceGroup
in package
Price list group: sorts `Service` items into sections shown on the front end.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_company_service_groups'
- #[TableAlias]
- 'serviceGroup'
Table of Contents
Properties
- $companyId : int
- $deleted : bool
- $icon : string|null
- $id : int|null
- $imageId : int|null
- $order : int
- $public : bool
- $translations : Collection<int, ServiceGroupText>
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
- getIcon() : string|null
- getId() : int|null
- getImageId() : int|null
- getOrder() : int
- getPublic() : bool
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- isDeleted() : bool
- isPersisted() : bool
- isPublic() : bool
- removeTranslation() : $this
- setCompanyId() : $this
- setDeleted() : $this
- setIcon() : $this
- setId() : $this
- setImageId() : $this
- setOrder() : $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]
$deleted
protected
bool
$deleted
= false
Attributes
- #[Column]
- $name: 'deleted'
- $type: 'boolean'
$icon
protected
string|null
$icon
= null
Attributes
- #[Column]
- $name: 'icon'
- $type: 'string'
- $length: 50
- $nullable: true
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'service_group_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$imageId
protected
int|null
$imageId
= null
Attributes
- #[Column]
- $name: 'image_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- $nullable: true
$order
protected
int
$order
= 0
Attributes
- #[Column]
- $name: '`order`'
- $type: 'integer'
- $options: ['unsigned' => true, 'default' => 0]
$public
protected
bool
$public
= true
Attributes
- #[Column]
- $name: 'public'
- $type: 'boolean'
$translations
protected
Collection<int, ServiceGroupText>
$translations
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Company\Models\Entities\ServiceGroupText::class
- $mappedBy: 'parent'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
Methods
__construct()
public
__construct([int|null $id = null ][, int $companyId = 0 ][, string|null $icon = null ][, int|null $imageId = null ][, int $order = 0 ][, bool $public = true ][, bool $deleted = false ]) : mixed
Parameters
- $id : int|null = null
- $companyId : int = 0
- $icon : string|null = null
- $imageId : int|null = null
- $order : int = 0
- $public : bool = true
- $deleted : 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
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
intgetDeleted()
public
getDeleted() : bool
Return values
boolgetIcon()
public
getIcon() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetImageId()
public
getImageId() : int|null
Return values
int|nullgetOrder()
public
getOrder() : int
Return values
intgetPublic()
public
getPublic() : bool
Return values
boolgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>isDeleted()
public
isDeleted() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisPublic()
public
isPublic() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetCompanyId()
public
setCompanyId(int $companyId) : $this
Parameters
- $companyId : int
Return values
$thissetDeleted()
public
setDeleted(bool $deleted) : $this
Parameters
- $deleted : bool
Return values
$thissetIcon()
public
setIcon(string|null $icon) : $this
Parameters
- $icon : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetImageId()
public
setImageId(int|null $imageId) : $this
Parameters
- $imageId : int|null
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
Return values
$thissetPublic()
public
setPublic(bool $public) : $this
Parameters
- $public : bool
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
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>