Arikaim CMS

ViewInterface

View interface

Table of Contents

Methods

addGlobal()  : void
Add global variable
createComponent()  : ComponentInterface
Create component
fetch()  : string|null
Render template
fetchBlock()  : string|null
Render template block
fetchFromString()  : string
Render template from string
getCache()  : CacheInterface
Get cache
getCurrentExtension()  : ExtensionInterface
Get current extension
getEnvironment()  : Environment
Get Twig environment
getExtension()  : ExtensionInterface
Get twig extension
getExtensionsPath()  : string
Gte extensions path
getGlobals()  : array<string|int, mixed>
Get all global vars
getPrimaryTemplate()  : string
Get primary template
getService()  : mixed|null
Get service
getTemplatesPath()  : string
Get templates path
getViewPath()  : string
Get view path
renderComponent()  : HtmlComponentInterface
Render html component
setPrimaryTemplate()  : void
Set primary template

Methods

addGlobal()

Add global variable

public addGlobal(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

createComponent()

Create component

public createComponent(string $name, string $language, string $type[, int|null $renderMode = null ][, array<string|int, mixed> $parent = [] ]) : ComponentInterface
Parameters
$name : string
$language : string
$type : string
$renderMode : int|null = null
$parent : array<string|int, mixed> = []
Return values
ComponentInterface

fetch()

Render template

public fetch(string $template[, array<string|int, mixed> $params = [] ]) : string|null
Parameters
$template : string
$params : array<string|int, mixed> = []
Return values
string|null

fetchBlock()

Render template block

public fetchBlock(string $template, string $block[, array<string|int, mixed> $params = [] ]) : string|null
Parameters
$template : string
$block : string
$params : array<string|int, mixed> = []
Return values
string|null

fetchFromString()

Render template from string

public fetchFromString(string $string[, array<string|int, mixed> $params = [] ]) : string
Parameters
$string : string
$params : array<string|int, mixed> = []
Return values
string

getCache()

Get cache

public getCache() : CacheInterface
Return values
CacheInterface

getCurrentExtension()

Get current extension

public getCurrentExtension() : ExtensionInterface
Return values
ExtensionInterface

getEnvironment()

Get Twig environment

public getEnvironment() : Environment
Return values
Environment

getExtension()

Get twig extension

public getExtension(string $class) : ExtensionInterface
Parameters
$class : string
Return values
ExtensionInterface

getExtensionsPath()

Gte extensions path

public getExtensionsPath() : string
Return values
string

getGlobals()

Get all global vars

public getGlobals() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPrimaryTemplate()

Get primary template

public getPrimaryTemplate() : string
Return values
string

getService()

Get service

public getService(string $name) : mixed|null
Parameters
$name : string
Return values
mixed|null

getTemplatesPath()

Get templates path

public getTemplatesPath() : string
Return values
string

getViewPath()

Get view path

public getViewPath() : string
Return values
string

renderComponent()

Render html component

public renderComponent(string $name, string $language[, array<string|int, mixed>|null $params = [] ][, string|null $type = null ][, int|null $mode = null ][, array<string|int, mixed> $parent = [] ]) : HtmlComponentInterface
Parameters
$name : string
$language : string
$params : array<string|int, mixed>|null = []
$type : string|null = null
$mode : int|null = null
$parent : array<string|int, mixed> = []
Return values
HtmlComponentInterface

setPrimaryTemplate()

Set primary template

public setPrimaryTemplate(string $templateName) : void
Parameters
$templateName : string

        
On this page

Search results