CoolCMS API

Service extends Service
in package

Price list item: a presentation price and/or an hourly rate for work.

Tags
extends
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<int, ServiceText>
$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'
#[ExternalReadonly]

$companyId

protected int $companyId = 0
Attributes
#[Column]
$name: 'company_id'
$type: 'integer'
$options: ['unsigned' => true]

$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<int, ServiceText> $translations
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\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
$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>

getCompanyId()

public getCompanyId() : int
Return values
int

getDeleted()

public getDeleted() : bool
Return values
bool

getHourlyRate()

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

getOrder()

public getOrder() : int
Return values
int

getPrice()

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

getPriceFrom()

public getPriceFrom() : bool
Return values
bool

getPublic()

public getPublic() : bool
Return values
bool

getServiceGroupId()

public getServiceGroupId() : int|null
Return values
int|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>

getUnit()

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

isActivated()

public isActivated() : bool
Return values
bool

isDeleted()

public isDeleted() : bool
Return values
bool

isPriceFrom()

public isPriceFrom() : bool
Return values
bool

isPublic()

public isPublic() : 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

setCompanyId()

public setCompanyId(int $companyId) : $this
Parameters
$companyId : int
Return values
$this

setDeleted()

public setDeleted(bool $deleted) : $this
Parameters
$deleted : bool
Return values
$this

setHourlyRate()

public setHourlyRate(string|null $hourlyRate) : $this
Parameters
$hourlyRate : string|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setOrder()

public setOrder(int $order) : $this
Parameters
$order : int
Return values
$this

setPrice()

public setPrice(string|null $price) : $this
Parameters
$price : string|null
Return values
$this

setPriceFrom()

public setPriceFrom(bool $priceFrom) : $this
Parameters
$priceFrom : bool
Return values
$this

setPublic()

public setPublic(bool $public) : $this
Parameters
$public : bool
Return values
$this

setServiceGroupId()

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

setUnit()

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