Documentation

SiteBase
in package
implements ExtensionInterface

Plates template helper

Table of Contents

Interfaces

ExtensionInterface

Properties

$template  : mixed
$container  : ContainerInterface
$currentWebsite  : Website|null
$engine  : Engine

Methods

__construct()  : mixed
constructor
assetUrl()  : string
gets asset url
drawIcon()  : void
draws icon
env()  : mixed
gets env variable
getAdminSidebarVisibleLinks()  : array<string|int, mixed>
returns admin links for sidebar
getCurrentLocale()  : string|null
gets current locale
getCurrentUrl()  : string
getCurrentWebsite()  : Website|null
gets current website
getCurrentWebsiteName()  : string
gets current website name
getDarkModeSwitch()  : string
getDebugbar()  : StandardDebugBar
return debugger object
getGravatar()  : string
gets gravatar html
getObject()  : self
gets helper object
getPageRegions()  : array<string|int, mixed>
returns page regions
getQrCode()  : string
getUrl()  : string
gets route url by name and params
register()  : void
{@inheritdoc}
renderAdminTable()  : string
renderBlocks()  : string
render block for region
renderFlashMessages()  : void
draws flash messages
summarize()  : string
summarize text
translate()  : string
gets string translations
version()  : string
gets app version
getApp()  : App|null
gets app object
getAssets()  : Manager
gets assets manager object
getHtmlRenderer()  : HtmlPartsRenderer
gets html parts renderer
getSiteData()  : SiteData
gets site_data
getUtils()  : Globals
gets utils

Properties

$container

protected ContainerInterface $container

$currentWebsite

protected static Website|null $currentWebsite = null

current website cached element

$engine

protected Engine $engine

templates engine

Methods

__construct()

constructor

public __construct(ContainerInterface $container) : mixed
Parameters
$container : ContainerInterface

assetUrl()

gets asset url

public assetUrl(string $asset_path) : string
Parameters
$asset_path : string
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
throws
PhpfastcacheSimpleCacheException
Return values
string

drawIcon()

draws icon

public drawIcon(string $icon_name[, mixed $attributes = [] ][, mixed $translateSectionsName = false ]) : void
Parameters
$icon_name : string
$attributes : mixed = []
$translateSectionsName : mixed = false
Tags
throws
BasicException

env()

gets env variable

public env(string $variable[, null $default = null ]) : mixed
Parameters
$variable : string
$default : null = null
Tags
throws
BasicException

returns admin links for sidebar

public getAdminSidebarVisibleLinks(AdminPage $controller) : array<string|int, mixed>
Parameters
$controller : AdminPage
Return values
array<string|int, mixed>

getCurrentLocale()

gets current locale

public getCurrentLocale() : string|null
Return values
string|null

getCurrentUrl()

public getCurrentUrl() : string
Return values
string

getCurrentWebsite()

gets current website

public getCurrentWebsite() : Website|null
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
Return values
Website|null

getCurrentWebsiteName()

gets current website name

public getCurrentWebsiteName() : string
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
Return values
string

getDarkModeSwitch()

public getDarkModeSwitch(AdminPage $controller) : string
Parameters
$controller : AdminPage
Return values
string

getDebugbar()

return debugger object

public getDebugbar() : StandardDebugBar
Return values
StandardDebugBar

getGravatar()

gets gravatar html

public getGravatar(string $email[, int $s = 80 ][, string $d = 'mp' ][, string $r = 'g' ][, string $class = 'rounded-circle' ]) : string
Parameters
$email : string
$s : int = 80
$d : string = 'mp'
$r : string = 'g'
$class : string = 'rounded-circle'
Return values
string

getObject()

gets helper object

public getObject() : self
Return values
self

getPageRegions()

returns page regions

public getPageRegions() : array<string|int, mixed>
Tags
throws
BasicException
Return values
array<string|int, mixed>

getQrCode()

public getQrCode(mixed $url) : string
Parameters
$url : mixed
Return values
string

getUrl()

gets route url by name and params

public getUrl(string $route_name[, array<string|int, mixed> $route_params = [] ]) : string
Parameters
$route_name : string
$route_params : array<string|int, mixed> = []
Return values
string

register()

{@inheritdoc}

public register(Engine $engine) : void
Parameters
$engine : Engine

[description]

renderAdminTable()

public renderAdminTable(array<string|int, mixed> $elements[, array<string|int, mixed>|null $header = null ][, BasePage|null $current_page = null ]) : string
Parameters
$elements : array<string|int, mixed>
$header : array<string|int, mixed>|null = null
$current_page : BasePage|null = null
Return values
string

renderBlocks()

render block for region

public renderBlocks(mixed $region, BasePage $controller) : string
Parameters
$region : mixed
$controller : BasePage
Tags
throws
BasicException
throws
PhpfastcacheSimpleCacheException
throws
DependencyException
throws
NotFoundException
Return values
string

renderFlashMessages()

draws flash messages

public renderFlashMessages(BasePage $controller) : void
Parameters
$controller : BasePage
Tags
throws
DependencyException
throws
NotFoundException

summarize()

summarize text

public summarize(string $text[, int $max_words = 10 ]) : string
Parameters
$text : string
$max_words : int = 10
Return values
string

translate()

gets string translations

public translate(string $string[, array<string|int, mixed> $params = [] ]) : string
Parameters
$string : string
$params : array<string|int, mixed> = []
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
Return values
string

version()

gets app version

public version() : string
Return values
string

getApp()

gets app object

protected getApp() : App|null
Return values
App|null

        
On this page

Search results