Route
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait, TranslationCollectionTrait, PageCollectionTrait
AbstractYes
Tags
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
$thisaddTranslation()
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
getAction()
public
getAction() : string
Return values
stringgetAllTraits()
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>getId()
public
getId() : int|null
Return values
int|nullgetMask()
public
getMask() : string
Return values
stringgetModule()
public
getModule() : string
Return values
stringgetModuleId()
public
getModuleId() : int|null
Return values
int|nullgetOrder()
public
getOrder() : int
Return values
intgetPage()
public
getPage(int $pageId) : TPage|null
Parameters
- $pageId : int
Return values
TPage|nullgetPages()
public
getPages() : Collection<int, TPage>
Return values
Collection<int, TPage>getPresenter()
public
getPresenter() : string
Return values
stringgetRouteFactory()
public
getRouteFactory() : string|null
Return values
string|nullgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>isPersisted()
public
isPersisted() : bool
Return values
boolpageCollectionInit()
public
pageCollectionInit() : void
removePage()
public
removePage(TPage $page) : $this
Parameters
- $page : TPage
Return values
$thisremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetAction()
public
setAction(string $action) : $this
Parameters
- $action : string
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetMask()
public
setMask(string $mask) : $this
Parameters
- $mask : string
Return values
$thissetModule()
public
setModule(string $module) : $this
Parameters
- $module : string
Return values
$thissetModuleId()
public
setModuleId(int|null $moduleId) : $this
Parameters
- $moduleId : int|null
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
Return values
$thissetPages()
public
setPages(Collection<int, TPage>|array<int, TPage> $pages) : $this
Parameters
- $pages : Collection<int, TPage>|array<int, TPage>
Return values
$thissetPresenter()
public
setPresenter(string $presenter) : $this
Parameters
- $presenter : string
Return values
$thissetRouteFactory()
public
setRouteFactory(string|null $routeFactory) : $this
Parameters
- $routeFactory : string|null
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
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>