Base extends Template
Table of Contents
- TEMPLATES_BASE_DIR = 'templates/lotgd'
- TEMPLATES_CORE_BASE_DIR = 'templates_core'
- TEMPLATES_LAYOUT_DIR = 'themes'
- TEMPLATES_MODULES_BASE_DIR = 'templates_modules'
- $defaultSkin : mixed
- $lotgdKernel : mixed
- $lotgdKernelContainer : mixed
- $lotgdTemplateParams : mixed
- $lotgdTemplateSystem : mixed
- $mandatoryFunctionsErrors : mixed
- $serviceManager : mixed
- $themefolder : mixed
- $themeName : mixed
- $themeNamespace : mixed
- __construct() : mixed
- {@inheritdoc}.
- getContainer() : object
- Get container.
- getDefaultSkin() : string
- Get default skin of game.
- getKernel() : Kernel
- Get LoTGD Kernel.
- getService() : mixed
- Get container.
- getTemplate() : object|null
- Get theme instance.
- getTemplateParams() : object|null
- Get template params instance.
- getTheme() : string
- Get namespace for theme.
- getThemeFolder() : string
- Get name of theme folder.
- getThemeNamespace() : string
- Get active theme.
- load() : mixed
- {@inheritDoc}
- prepareTheme() : mixed
- Prepare template for use.
- render() : string
- {@inheritdoc} Added params to templates.
- renderBlock() : mixed
- Render a block of a template.
- renderLayout() : string
- Render content in layout with active theme.
- setContainer() : mixed
- Set container (Service Manager).
- setDefaultSkin() : $this
- Change default theme Need if change theme with form.
- getValidTheme() : string
- Search for a valid theme if removed.
- updateGlobals() : void
- Update globals parameters.
Constants
TEMPLATES_BASE_DIR
public
mixed
TEMPLATES_BASE_DIR
= 'templates/lotgd'
TEMPLATES_CORE_BASE_DIR
public
mixed
TEMPLATES_CORE_BASE_DIR
= 'templates_core'
TEMPLATES_LAYOUT_DIR
public
mixed
TEMPLATES_LAYOUT_DIR
= 'themes'
TEMPLATES_MODULES_BASE_DIR
public
mixed
TEMPLATES_MODULES_BASE_DIR
= 'templates_modules'
Properties
$defaultSkin
protected
mixed
$defaultSkin
$lotgdKernel
protected
mixed
$lotgdKernel
$lotgdKernelContainer
protected
mixed
$lotgdKernelContainer
$lotgdTemplateParams
protected
mixed
$lotgdTemplateParams
$lotgdTemplateSystem
protected
mixed
$lotgdTemplateSystem
$mandatoryFunctionsErrors
protected
mixed
$mandatoryFunctionsErrors
= []
$serviceManager
protected
mixed
$serviceManager
$themefolder
protected
mixed
$themefolder
$themeName
protected
mixed
$themeName
$themeNamespace
protected
mixed
$themeNamespace
Methods
__construct()
{@inheritdoc}.
public
__construct([array<string|int, mixed> $loader = [] ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $loader : array<string|int, mixed> = []
- $options : array<string|int, mixed> = []
Return values
mixed —getContainer()
Get container.
public
getContainer([string $name = null ]) : object
Parameters
- $name : string = null
Tags
Return values
object —getDefaultSkin()
Get default skin of game.
public
getDefaultSkin() : string
Return values
string —getKernel()
Get LoTGD Kernel.
public
getKernel() : Kernel
Return values
Kernel —getService()
Get container.
public
getService(string $name) : mixed
Parameters
- $name : string
Return values
mixed —getTemplate()
Get theme instance.
public
getTemplate() : object|null
Return values
object|null —getTemplateParams()
Get template params instance.
public
getTemplateParams() : object|null
Return values
object|null —getTheme()
Get namespace for theme.
public
getTheme() : string
Return values
string —getThemeFolder()
Get name of theme folder.
public
getThemeFolder() : string
Return values
string —getThemeNamespace()
Get active theme.
public
getThemeNamespace() : string
Return values
string —load()
{@inheritDoc}
public
load(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —prepareTheme()
Prepare template for use.
public
prepareTheme() : mixed
Return values
mixed —render()
{@inheritdoc} Added params to templates.
public
render(string $name[, array<string|int, mixed> $context = [] ]) : string
Parameters
- $name : string
- $context : array<string|int, mixed> = []
Return values
string —renderBlock()
Render a block of a template.
public
renderBlock(string $blockName, string $template[, array<string|int, mixed> $context = [] ]) : mixed
Parameters
- $blockName : string
- $template : string
- $context : array<string|int, mixed> = []
Return values
mixed —renderLayout()
Render content in layout with active theme.
public
renderLayout(array<string|int, mixed> $context) : string
Parameters
- $context : array<string|int, mixed>
Return values
string —setContainer()
Set container (Service Manager).
public
setContainer(ContainerInterface $container) : mixed
Parameters
- $container : ContainerInterface
Tags
Return values
mixed —setDefaultSkin()
Change default theme Need if change theme with form.
public
setDefaultSkin(string $theme) : $this
Parameters
- $theme : string
Return values
$this —getValidTheme()
Search for a valid theme if removed.
protected
getValidTheme() : string
Tags
Return values
string —updateGlobals()
Update globals parameters.
protected
updateGlobals() : void