CoolCMS API

Route extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait, TranslationCollectionTrait, PageCollectionTrait

AbstractYes
Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'route'

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

$action  : string
$id  : int|null
$mask  : string
$module  : string
$moduleId  : int|null
$order  : int
$pages  : Collection<int, TPage>
$presenter  : string
$routeFactory  : string|null
$translations  : Collection<int, TTranslation>

Methods

__construct()  : mixed
addPage()  : $this
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAction()  : string
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getId()  : int|null
getMask()  : string
getModule()  : string
getModuleId()  : int|null
getOrder()  : int
getPage()  : TPage|null
getPages()  : Collection<int, TPage>
getPresenter()  : string
getRouteFactory()  : string|null
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
isPersisted()  : bool
pageCollectionInit()  : void
removePage()  : $this
removeTranslation()  : $this
setAction()  : $this
setId()  : $this
setMask()  : $this
setModule()  : $this
setModuleId()  : $this
setOrder()  : $this
setPages()  : $this
setPresenter()  : $this
setRouteFactory()  : $this
setTranslations()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$action

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

$id

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

$mask

protected string $mask = ''
Attributes
#[Column]
$name: 'mask'
$type: 'text'

$module

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

$moduleId

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

$order

protected int $order = 0
Attributes
#[Column]
$name: '`order`'
$type: 'integer'

$pages

protected Collection<int, TPage> $pages = new ArrayCollection()
Attributes
#[Transient]

$presenter

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

$routeFactory

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

$translations

protected Collection<int, TTranslation> $translations = new ArrayCollection()
Attributes
#[Transient]

Methods

__construct()

public __construct([int|null $id = null ][, int|null $moduleId = null ][, string $mask = '' ][, string $module = '' ][, string $presenter = '' ][, string $action = '' ][, int $order = 0 ][, string|null $routeFactory = null ][, Collection $translations = new ArrayCollection() ][, Collection $pages = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$moduleId : int|null = null
$mask : string = ''
$module : string = ''
$presenter : string = ''
$action : string = ''
$order : int = 0
$routeFactory : string|null = null
$translations : Collection = new ArrayCollection()
$pages : Collection = new ArrayCollection()

addPage()

public addPage(TPage $page) : $this
Parameters
$page : TPage
Return values
$this

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

getAction()

public getAction() : string
Return values
string

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>

getMask()

public getMask() : string
Return values
string

getModule()

public getModule() : string
Return values
string

getModuleId()

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

getOrder()

public getOrder() : int
Return values
int

getPage()

public getPage(int $pageId) : TPage|null
Parameters
$pageId : int
Return values
TPage|null

getPages()

public getPages() : Collection<int, TPage>
Return values
Collection<int, TPage>

getPresenter()

public getPresenter() : string
Return values
string

getRouteFactory()

public getRouteFactory() : string|null
Return values
string|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>

removePage()

public removePage(TPage $page) : $this
Parameters
$page : TPage
Return values
$this

removeTranslation()

public removeTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

setAction()

public setAction(string $action) : $this
Parameters
$action : string
Return values
$this

setId()

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

setMask()

public setMask(string $mask) : $this
Parameters
$mask : string
Return values
$this

setModule()

public setModule(string $module) : $this
Parameters
$module : string
Return values
$this

setModuleId()

public setModuleId(int|null $moduleId) : $this
Parameters
$moduleId : int|null
Return values
$this

setOrder()

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

setPages()

public setPages(Collection<int, TPage>|array<int, TPage> $pages) : $this
Parameters
$pages : Collection<int, TPage>|array<int, TPage>
Return values
$this

setPresenter()

public setPresenter(string $presenter) : $this
Parameters
$presenter : string
Return values
$this

setRouteFactory()

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

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