Documentation

HtmlPartsRenderer extends ContainerAwareObject
in package

Html Parts Renderer Helper Class

Table of Contents

Properties

$translators  : array<string|int, mixed>
$container  : ContainerInterface

Methods

__call()  : mixed
{@inheritdoc}
__construct()  : mixed
constructor
containerCall()  : mixed
call method through container
containerMake()  : mixed
create object through container
getApp()  : App
gets app object
getApplicationLogger()  : Manager
gets application_logger service
getAppRouteInfo()  : RouteInfo|null
gets route info
getAppWebsite()  : Website|null
gets current website
getAssets()  : Manager
gets assets manager
getCache()  : Manager
get cache manager
getContainer()  : ContainerInterface
gets container object
getCrudRouter()  : Crud
gets crud service
getDb()  : Database
gets db object
getDebugbar()  : StandardDebugBar
gets debugbar object
getEnv()  : mixed
gets env variable
getEventManager()  : SharedEventEmitter
gets events manager service
getFAIcon()  : string
gets an Font Awesome icon
getGoogleAuthenticator()  : PHPGangsta_GoogleAuthenticator
gets google authenticator service
getGravatar()  : string
Get either a Gravatar image tag for a specified email address.
getGuzzle()  : Client
gets guzzle service
getHtmlAdminClasses()  : string
returns body_classes array based on controller
getHtmlRenderer()  : HtmlPartsRenderer
gets html renderer service
getIcon()  : string
gets an icon
getIcons()  : Icons
gets icons service
getImagine()  : Imagine
gets imagine service
getLog()  : Logger
gets log object
getMailer()  : Mailer
gets mailer service
getPdo()  : PDO
gets PDO object
getRedis()  : Manager
gets redis service
getRequest()  : Request
gets current request object
getRouters()  : array<string|int, mixed>
gets routers
getSchema()  : Schema
gets schema object
getSearch()  : Manager
gets search service
getSesMailer()  : SesClient
gets SES mailer service
getSiteData()  : SiteData
gets site data service
getSmtpMailer()  : Swift_Mailer
gets SMTP mailer service
getTemplates()  : Engine
gets plates engine object
getTranslator()  : Translator
gets translator
getUtils()  : Globals
gets global utils service
getWebhooksRouter()  : Webhooks
gets webhooks service
getWebRouter()  : Web
gets routing service
getZip()  : Zip
gets zip service
renderAdminTable()  : string
renders admin table
renderApplicationLog()  : mixed
renders application log
renderArrayOnTable()  : mixed
Renders array as table field name - field value
renderBlocks()  : string|null
render region blocks
renderFlag()  : string
renders a flag icon
renderFlashMessages()  : TagList
returns flash message html
renderLog()  : mixed
renders log
renderPaginator()  : string
renders paginator
renderQueueMessage()  : mixed
renders queue message
renderSiteMenu()  : string|null
render site menu
renderUncachableBlockTag()  : string
requestUrl()  : string|bool
executes an http request
getService()  : mixed
gets registered service
internalRenderSiteMenu()  : TagElement
internally renders site menu
renderMenuLink()  : TagElement
internally renders menu link
getPaginatorLi()  : TagElement
gets paginator li html tag

Properties

$translators

public static array<string|int, mixed> $translators = []

translators

Methods

__construct()

constructor

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

containerCall()

call method through container

public containerCall(callable $callable[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$callable : callable
$arguments : array<string|int, mixed> = []

containerMake()

create object through container

public containerMake(string $className[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$className : string
$arguments : array<string|int, mixed> = []

getContainer()

gets container object

public getContainer() : ContainerInterface
Return values
ContainerInterface

getDb()

gets db object

public getDb() : Database
Tags
throws
BasicException
Return values
Database

getDebugbar()

gets debugbar object

public getDebugbar() : StandardDebugBar
Tags
throws
BasicException
Return values
StandardDebugBar

getEnv()

gets env variable

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

getEventManager()

gets events manager service

public getEventManager() : SharedEventEmitter
Tags
throws
BasicException
Return values
SharedEventEmitter

getFAIcon()

gets an Font Awesome icon

public getFAIcon(string $icon_name, string $theme) : string
Parameters
$icon_name : string
$theme : string
Tags
throws
BasicException
Return values
string

getGoogleAuthenticator()

gets google authenticator service

public getGoogleAuthenticator() : PHPGangsta_GoogleAuthenticator
Tags
throws
BasicException
Return values
PHPGangsta_GoogleAuthenticator

getGravatar()

Get either a Gravatar image tag for a specified email address.

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

The email address

$s : int = 80

Size in pixels, defaults to 80px [ 1 - 2048 ]

$d : string = 'mp'

Default imageset to use [ 404 | mp | identicon | monsterid | wavatar ]

$r : string = 'g'

Maximum rating (inclusive) [ g | pg | r | x ]

$class : string = 'rounded-circle'

html class

Return values
string

containing a complete image tag

getGuzzle()

gets guzzle service

public getGuzzle() : Client
Tags
throws
BasicException
Return values
Client

getIcon()

gets an icon

public getIcon(string $icon_name[, array<string|int, mixed> $attributes = [] ]) : string
Parameters
$icon_name : string
$attributes : array<string|int, mixed> = []
Tags
throws
BasicException
Return values
string

getIcons()

gets icons service

public getIcons() : Icons
Tags
throws
BasicException
Return values
Icons

getImagine()

gets imagine service

public getImagine() : Imagine
Tags
throws
BasicException
Return values
Imagine

getLog()

gets log object

public getLog() : Logger
Tags
throws
BasicException
Return values
Logger

getPdo()

gets PDO object

public getPdo() : PDO
Tags
throws
BasicException
Return values
PDO

getRequest()

gets current request object

public getRequest() : Request
Tags
throws
BasicException
Return values
Request

getRouters()

gets routers

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

getSchema()

gets schema object

public getSchema() : Schema
Tags
throws
BasicException
Return values
Schema

getSesMailer()

gets SES mailer service

public getSesMailer() : SesClient
Tags
throws
BasicException
Return values
SesClient

getSmtpMailer()

gets SMTP mailer service

public getSmtpMailer() : Swift_Mailer
Tags
throws
BasicException
Return values
Swift_Mailer

getTemplates()

gets plates engine object

public getTemplates() : Engine
Tags
throws
BasicException
Return values
Engine

getTranslator()

gets translator

public getTranslator([string|null $locale_code = null ]) : Translator
Parameters
$locale_code : string|null = null
Tags
throws
DependencyException
throws
NotFoundException
Return values
Translator

renderAdminTable()

renders admin table

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

renderArrayOnTable()

Renders array as table field name - field value

public renderArrayOnTable(array<string|int, mixed> $data[, bool $nowrap = true ]) : mixed
Parameters
$data : array<string|int, mixed>
$nowrap : bool = true
Tags
throws
DependencyException
throws
NotFoundException

renderBlocks()

render region blocks

public renderBlocks(string $region[, null $locale = null ][, BasePage|null $current_page = null ]) : string|null
Parameters
$region : string
$locale : null = null
$current_page : BasePage|null = null
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
throws
PhpfastcacheSimpleCacheException
Return values
string|null

renderFlag()

renders a flag icon

public renderFlag(mixed $country_code[, string $class = 'flag-icon' ][, int $width = 20 ]) : string
Parameters
$country_code : mixed
$class : string = 'flag-icon'
$width : int = 20
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
throws
PhpfastcacheSimpleCacheException
Return values
string

renderFlashMessages()

returns flash message html

public renderFlashMessages(BasePage $controller) : TagList
Parameters
$controller : BasePage
Tags
throws
DependencyException
throws
NotFoundException
Return values
TagList

renderPaginator()

renders paginator

public renderPaginator(int $current_page, int $total, BasePage $controller[, int $page_size = BaseCollection::ITEMS_PER_PAGE ][, int $visible_links = 2 ]) : string
Parameters
$current_page : int
$total : int
$controller : BasePage
$page_size : int = BaseCollection::ITEMS_PER_PAGE
$visible_links : int = 2
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
Return values
string

renderSiteMenu()

render site menu

public renderSiteMenu(string $locale) : string|null
Parameters
$locale : string
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
throws
PhpfastcacheSimpleCacheException
Return values
string|null

renderUncachableBlockTag()

public renderUncachableBlockTag(Block $block, BasePage|null $current_page[, string|null $locale = null ]) : string
Parameters
$block : Block
$current_page : BasePage|null
$locale : string|null = null
Return values
string

requestUrl()

executes an http request

public requestUrl(string $url[, string $method = 'GET' ][, array<string|int, mixed> $options = [] ]) : string|bool
Parameters
$url : string
$method : string = 'GET'
$options : array<string|int, mixed> = []
Tags
throws
Exception
throws
GuzzleException
Return values
string|bool

getService()

gets registered service

protected getService(string $service_key) : mixed
Parameters
$service_key : string
Tags
throws
BasicException

internalRenderSiteMenu()

internally renders site menu

protected internalRenderSiteMenu(array<string|int, mixed> $menu_tree[, array<string|int, mixed>|null $parent = null ]) : TagElement
Parameters
$menu_tree : array<string|int, mixed>
$parent : array<string|int, mixed>|null = null
Tags
throws
DependencyException
throws
NotFoundException
Return values
TagElement

internally renders menu link

protected renderMenuLink(array<string|int, mixed> $leaf[, string $link_class = 'nav-link' ]) : TagElement
Parameters
$leaf : array<string|int, mixed>
$link_class : string = 'nav-link'
Tags
throws
DependencyException
throws
NotFoundException
Return values
TagElement

getPaginatorLi()

gets paginator li html tag

private getPaginatorLi(string $li_class, string|null $href, string $text) : TagElement
Parameters
$li_class : string
$href : string|null
$text : string
Tags
throws
DependencyException
throws
NotFoundException
Return values
TagElement

        
On this page

Search results