Properties

$engine

$engine : \League\Plates\Engine

Type

\League\Plates\Engine — templates engine

$container

$container : \Psr\Container\ContainerInterface

Type

\Psr\Container\ContainerInterface — container

Methods

__construct()

__construct(\Psr\Container\ContainerInterface  $container) : mixed

constructor

Parameters

\Psr\Container\ContainerInterface $container

Returns

mixed —

register()

register(\League\Plates\Engine  $engine) : void

{@inheritdocs}

Parameters

\League\Plates\Engine $engine

[description]

getObject()

getObject() : self

gets helper object

Returns

self —

getCurrentWebsite()

getCurrentWebsite() : \App\Site\Models\Website|null

gets current website

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException

Returns

\App\Site\Models\Website|null —

getCurrentWebsiteName()

getCurrentWebsiteName() : string

gets current website name

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException

Returns

string —

getCurrentLocale()

getCurrentLocale() : string

gets current locale

Returns

string —

renderBlocks()

renderBlocks( $region, \App\Base\Abstracts\Controllers\BasePage  $controller) : string

render block for region

Parameters

$region
\App\Base\Abstracts\Controllers\BasePage $controller

Throws

\Degami\Basics\Exceptions\BasicException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException
\DI\DependencyException
\DI\NotFoundException

Returns

string —

translate()

translate(string  $string) : string

gets string translations

Parameters

string $string

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException

Returns

string —

getDebugbar()

getDebugbar() : \DebugBar\StandardDebugBar

return debugger object

Returns

\DebugBar\StandardDebugBar —

assetUrl()

assetUrl(string  $asset_path) : string

gets asset url

Parameters

string $asset_path

Throws

\Degami\Basics\Exceptions\BasicException
\DI\DependencyException
\DI\NotFoundException
\Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException

Returns

string —

getUrl()

getUrl(string  $route_name, array  $route_params = []) : string

gets route url by name and params

Parameters

string $route_name
array $route_params

Returns

string —

getGravatar()

getGravatar(string  $email, int  $s = 80, string  $d = 'mp', string  $r = 'g', string  $class = 'rounded-circle') : string

gets gravatar html

Parameters

string $email
int $s
string $d
string $r
string $class

Returns

string —

drawIcon()

drawIcon(string  $icon_name) : void

draws icon

Parameters

string $icon_name

Throws

\Degami\Basics\Exceptions\BasicException

env()

env(string  $variable, null  $default = null) : mixed

gets env variable

Parameters

string $variable
null $default

Throws

\Degami\Basics\Exceptions\BasicException

Returns

mixed —

version()

version() : string

gets app version

Returns

string —

renderFlashMessages()

renderFlashMessages(\App\Base\Abstracts\Controllers\BasePage  $controller) : void

draws flash messages

Parameters

\App\Base\Abstracts\Controllers\BasePage $controller

Throws

\DI\DependencyException
\DI\NotFoundException

summarize()

summarize(string  $text, int  $max_words = 10) : string

summarize text

Parameters

string $text
int $max_words

Returns

string —

getPageRegions()

getPageRegions() : array

returns page regions

Throws

\Degami\Basics\Exceptions\BasicException

Returns

array —

getAssets()

getAssets() : \App\Base\Tools\Assets\Manager

gets assets manager object

Returns

\App\Base\Tools\Assets\Manager —

getHtmlRenderer()

getHtmlRenderer() : \App\Base\Tools\Utils\HtmlPartsRenderer

gets html parts renderer

Returns

\App\Base\Tools\Utils\HtmlPartsRenderer —

getUtils()

getUtils() : \App\Base\Tools\Utils\Globals

gets utils

Returns

\App\Base\Tools\Utils\Globals —

getSiteData()

getSiteData() : \App\Base\Tools\Utils\SiteData

gets site_data

Returns

\App\Base\Tools\Utils\SiteData —

getApp()

getApp() : \App\App|null

gets app object

Returns

\App\App|null —