CoolCMS API

Component extends Component
in package

Attributes
#[Entity]
#[Table]
$name: 'cms_system_component'
#[TableAlias]
'component'

Table of Contents

Properties

$active  : bool
$attrClass  : string
$attrId  : string
$controller  : string
$id  : int|null
$name  : string
$settings  : string

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActive()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getAttrClass()  : string
getAttrId()  : string
getController()  : string
getId()  : int|null
getName()  : string
getSettings()  : string
isActive()  : bool
isPersisted()  : bool
setActive()  : $this
setAttrClass()  : $this
setAttrId()  : $this
setController()  : $this
setId()  : $this
setName()  : $this
setSettings()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$active

protected bool $active = false
Attributes
#[Column]
$name: 'active'
$type: 'boolean'

$attrClass

protected string $attrClass = ''
Attributes
#[Column]
$name: 'attr_class'
$type: 'string'
$length: 50

$attrId

protected string $attrId = ''
Attributes
#[Column]
$name: 'attr_id'
$type: 'string'
$length: 50

$controller

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

$id

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

$name

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

$settings

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

Methods

__construct()

public __construct([int|null $id = null ][, string $controller = '' ][, string $name = '' ][, string $attrClass = '' ][, string $attrId = '' ][, string $settings = '' ][, bool $active = false ]) : mixed
Parameters
$id : int|null = null
$controller : string = ''
$name : string = ''
$attrClass : string = ''
$attrId : string = ''
$settings : string = ''
$active : bool = false

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getActive()

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

getAttrClass()

public getAttrClass() : string
Return values
string

getAttrId()

public getAttrId() : string
Return values
string

getController()

public getController() : string
Return values
string

getName()

public getName() : string
Return values
string

getSettings()

public getSettings() : string
Return values
string

isActive()

public isActive() : bool
Return values
bool

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setAttrClass()

public setAttrClass(string $attrClass) : $this
Parameters
$attrClass : string
Return values
$this

setAttrId()

public setAttrId(string $attrId) : $this
Parameters
$attrId : string
Return values
$this

setController()

public setController(string $controller) : $this
Parameters
$controller : string
Return values
$this

setId()

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

setName()

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

setSettings()

public setSettings(string $settings) : $this
Parameters
$settings : string
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