Service
extends Service
in package
Price list item: a presentation price and/or an hourly rate for work.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_company_services'
- #[TableAlias]
- 'service'
Table of Contents
Properties
- $activated : bool
- $companyId : int
- $deleted : bool
- $hourlyRate : string|null
- $id : int|null
- $order : int
- $price : string|null
- $priceFrom : bool
- $public : bool
- $serviceGroupId : int|null
- $translations : Collection
- $unit : 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.
- getCompanyId() : int
- getDeleted() : bool
- getHourlyRate() : string|null
- getId() : int|null
- getOrder() : int
- getPrice() : string|null
- getPriceFrom() : bool
- getPublic() : bool
- getServiceGroupId() : int|null
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- getUnit() : string|null
- isActivated() : bool
- isDeleted() : bool
- isPersisted() : bool
- isPriceFrom() : bool
- isPublic() : bool
- removeTranslation() : $this
- setActivated() : $this
- setCompanyId() : $this
- setDeleted() : $this
- setHourlyRate() : $this
- setId() : $this
- setOrder() : $this
- setPrice() : $this
- setPriceFrom() : $this
- setPublic() : $this
- setServiceGroupId() : $this
- setTranslations() : $this
- setUnit() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$activated
protected
bool
$activated
= true
Attributes
- #[Column]
- $name: 'activated'
- $type: 'boolean'
$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'
$hourlyRate
protected
string|null
$hourlyRate
= null
Attributes
- #[Column]
- $name: 'hourly_rate'
- $type: 'decimal'
- $precision: 10
- $scale: 2
- $nullable: true
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'service_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$order
protected
int
$order
= 0
Attributes
- #[Column]
- $name: '`order`'
- $type: 'integer'
- $options: ['unsigned' => true, 'default' => 0]
$price
protected
string|null
$price
= null
Attributes
- #[Column]
- $name: 'price'
- $type: 'decimal'
- $precision: 10
- $scale: 2
- $nullable: true
$priceFrom
protected
bool
$priceFrom
= false
Attributes
- #[Column]
- $name: 'price_from'
- $type: 'boolean'
$public
protected
bool
$public
= true
Attributes
- #[Column]
- $name: 'public'
- $type: 'boolean'
$serviceGroupId
protected
int|null
$serviceGroupId
= null
Attributes
- #[Column]
- $name: 'service_group_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- $nullable: true
$translations
protected
Collection
$translations
Attributes
- #[CollectionOf]
- \App\UI\Front\Company\Models\Entities\ServiceText::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Front\Company\Models\Entities\ServiceText::class
- $mappedBy: 'parent'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
$unit
protected
string|null
$unit
= null
Attributes
- #[Column]
- $name: 'unit'
- $type: 'string'
- $length: 20
- $nullable: true
Methods
__construct()
public
__construct([int|null $id = null ][, int $companyId = 0 ][, int|null $serviceGroupId = null ][, string|null $price = null ][, bool $priceFrom = false ][, string|null $unit = null ][, string|null $hourlyRate = null ][, int $order = 0 ][, bool $public = true ][, bool $activated = true ][, bool $deleted = false ]) : mixed
Parameters
- $id : int|null = null
- $companyId : int = 0
- $serviceGroupId : int|null = null
- $price : string|null = null
- $priceFrom : bool = false
- $unit : string|null = null
- $hourlyRate : string|null = null
- $order : int = 0
- $public : bool = true
- $activated : 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
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>getCompanyId()
public
getCompanyId() : int
Return values
intgetDeleted()
public
getDeleted() : bool
Return values
boolgetHourlyRate()
public
getHourlyRate() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetOrder()
public
getOrder() : int
Return values
intgetPrice()
public
getPrice() : string|null
Return values
string|nullgetPriceFrom()
public
getPriceFrom() : bool
Return values
boolgetPublic()
public
getPublic() : bool
Return values
boolgetServiceGroupId()
public
getServiceGroupId() : 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>getUnit()
public
getUnit() : string|null
Return values
string|nullisActivated()
public
isActivated() : bool
Return values
boolisDeleted()
public
isDeleted() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisPriceFrom()
public
isPriceFrom() : bool
Return values
boolisPublic()
public
isPublic() : 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
$thissetCompanyId()
public
setCompanyId(int $companyId) : $this
Parameters
- $companyId : int
Return values
$thissetDeleted()
public
setDeleted(bool $deleted) : $this
Parameters
- $deleted : bool
Return values
$thissetHourlyRate()
public
setHourlyRate(string|null $hourlyRate) : $this
Parameters
- $hourlyRate : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
Return values
$thissetPrice()
public
setPrice(string|null $price) : $this
Parameters
- $price : string|null
Return values
$thissetPriceFrom()
public
setPriceFrom(bool $priceFrom) : $this
Parameters
- $priceFrom : bool
Return values
$thissetPublic()
public
setPublic(bool $public) : $this
Parameters
- $public : bool
Return values
$thissetServiceGroupId()
public
setServiceGroupId(int|null $serviceGroupId) : $this
Parameters
- $serviceGroupId : 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
$thissetUnit()
public
setUnit(string|null $unit) : $this
Parameters
- $unit : 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>