CoolCMS API

Supplier extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait

AbstractYes
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'supplier'

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
$code  : string|null
$deliveryDays  : int|null
$email  : string|null
$id  : int|null
$insertDatetime  : DateTime
$name  : string
$note  : string|null
$phone  : string|null

Methods

__construct()  : mixed
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.
getCode()  : string|null
getDeliveryDays()  : int|null
getEmail()  : string|null
getId()  : int|null
getInsertDatetime()  : DateTime
getName()  : string
getNote()  : string|null
getPhone()  : string|null
isActivated()  : bool
isPersisted()  : bool
setActivated()  : $this
setCode()  : $this
setDeliveryDays()  : $this
setEmail()  : $this
setId()  : $this
setInsertDatetime()  : $this
setName()  : $this
setNote()  : $this
setPhone()  : $this
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]

$code

protected string|null $code = null
Attributes
#[Column]
$name: 'code'
$type: 'string'
$length: 30
$nullable: true

$deliveryDays

protected int|null $deliveryDays = null
Attributes
#[Column]
$name: 'delivery_days'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$email

protected string|null $email = null
Attributes
#[Column]
$name: 'email'
$type: 'string'
$length: 255
$nullable: true

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'supplier_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$insertDatetime

protected DateTime $insertDatetime = new DateTime()
Attributes
#[Column]
$name: 'insert_datetime'
$type: 'datetime'
#[ExternalReadonly]

$name

protected string $name = ''
Attributes
#[Column]
$name: 'name'
$type: 'string'
$length: 255

$note

protected string|null $note = null
Attributes
#[Column]
$name: 'note'
$type: 'text'
$nullable: true

$phone

protected string|null $phone = null
Attributes
#[Column]
$name: 'phone'
$type: 'string'
$length: 255
$nullable: true

Methods

__construct()

public __construct([int|null $id = null ][, string $name = '' ][, string|null $code = null ][, string|null $email = null ][, string|null $phone = null ][, int|null $deliveryDays = null ][, string|null $note = null ][, bool $activated = true ][, DateTime $insertDatetime = new DateTime() ]) : mixed
Parameters
$id : int|null = null
$name : string = ''
$code : string|null = null
$email : string|null = null
$phone : string|null = null
$deliveryDays : int|null = null
$note : string|null = null
$activated : bool = true
$insertDatetime : DateTime = new DateTime()

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>

getCode()

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

getDeliveryDays()

public getDeliveryDays() : int|null
Return values
int|null

getEmail()

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

getInsertDatetime()

public getInsertDatetime() : DateTime
Return values
DateTime

getName()

public getName() : string
Return values
string

getNote()

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

getPhone()

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

isActivated()

public isActivated() : bool
Return values
bool

setActivated()

public setActivated(bool $activated) : $this
Parameters
$activated : bool
Return values
$this

setCode()

public setCode(string|null $code) : $this
Parameters
$code : string|null
Return values
$this

setDeliveryDays()

public setDeliveryDays(int|null $deliveryDays) : $this
Parameters
$deliveryDays : int|null
Return values
$this

setEmail()

public setEmail(string|null $email) : $this
Parameters
$email : string|null
Return values
$this

setId()

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

setInsertDatetime()

public setInsertDatetime(DateTime $insertDatetime) : $this
Parameters
$insertDatetime : DateTime
Return values
$this

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setNote()

public setNote(string|null $note) : $this
Parameters
$note : string|null
Return values
$this

setPhone()

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