Documentation

Manager extends ContainerAwareObject
in package

Assets manager

Table of Contents

Constants

ASSETS_DOMAIN_PATH  = 'app/frontend/assets_domain'

Properties

$translators  : array<string|int, mixed>
$container  : ContainerInterface
$css  : array<string|int, mixed>
$head_css  : array<string|int, mixed>
$head_js  : array<string|int, mixed>
$head_js_generated  : bool
$head_js_scripts  : array<string|int, mixed>
$js  : array<string|int, mixed>
$js_generated  : bool

Methods

__call()  : mixed
{@inheritdoc}
__construct()  : mixed
constructor
addCss()  : self
Add css to element
addHeadCss()  : self
add head css
addHeadJs()  : self
add head js
addJs()  : self
add js
assetUrl()  : string
gets url for asset
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
getCss()  : array<string|int, mixed>
Get the element's css array
getDb()  : Database
gets db object
getDebugbar()  : StandardDebugBar
gets debugbar object
getEnv()  : mixed
gets env variable
getEventManager()  : SharedEventEmitter
gets events manager service
getGoogleAuthenticator()  : PHPGangsta_GoogleAuthenticator
gets google authenticator service
getGuzzle()  : Client
gets guzzle service
getHeadJs()  : array<string|int, mixed>
gets head js
getHeadJsScripts()  : array<string|int, mixed>
getHtmlRenderer()  : HtmlPartsRenderer
gets html renderer service
getIcons()  : Icons
gets icons service
getImagine()  : Imagine
gets imagine service
getJs()  : array<string|int, mixed>
gets js elements
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
renderHeadCSS()  : string
renderHeadInlineJS()  : string
gets inline js for head
renderHeadJsScripts()  : string
renderPageInlineCSS()  : string
gets inline css
renderPageInlineJS()  : string
gets inline js
requestUrl()  : string|bool
executes an http request
encapsulateJs()  : string
encapsulate js into jquery ready function
generateHeadJs()  : string
generate the js string
generateJs()  : string
generate the js string
generatePageJs()  : string
generate the js string
getService()  : mixed
gets registered service
isUrl()  : bool
minifyJs()  : string
minify js string

Constants

ASSETS_DOMAIN_PATH

public mixed ASSETS_DOMAIN_PATH = 'app/frontend/assets_domain'

Properties

$translators

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

translators

$css

protected array<string|int, mixed> $css = []

css

$head_css

protected array<string|int, mixed> $head_css = []

head css

$head_js

protected array<string|int, mixed> $head_js = ['encapsulated' => [], 'direct' => []]

head js

$head_js_generated

protected bool $head_js_generated = false

head js already generated flag

$head_js_scripts

protected array<string|int, mixed> $head_js_scripts = []

head js scripts

$js

protected array<string|int, mixed> $js = ['encapsulated' => [], 'direct' => []]

js

$js_generated

protected bool $js_generated = false

js already generated flag

Methods

__construct()

constructor

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

addCss()

Add css to element

public addCss(string|array<string|int, mixed> $css) : self
Parameters
$css : string|array<string|int, mixed>

css to add

Return values
self

addHeadCss()

add head css

public addHeadCss(string $url[, array<string|int, mixed> $tagAttributes = [] ]) : self
Parameters
$url : string

css url to add

$tagAttributes : array<string|int, mixed> = []

tag attributes

Return values
self

addHeadJs()

add head js

public addHeadJs(string $url[, array<string|int, mixed> $tagAttributes = [] ]) : self
Parameters
$url : string

javascript url to add

$tagAttributes : array<string|int, mixed> = []

tag attributes

Return values
self

addJs()

add js

public addJs(string|array<string|int, mixed> $js[, bool $as_is = false ][, string|null $position = null ][, bool $on_ready = true ]) : self
Parameters
$js : string|array<string|int, mixed>

javascript to add

$as_is : bool = false

no "minification"

$position : string|null = null
$on_ready : bool = true
Return values
self

assetUrl()

gets url for asset

public assetUrl(string $asset_path[, int|null $website_id = null ][, string|null $locale = null ]) : string
Parameters
$asset_path : string
$website_id : int|null = null
$locale : string|null = null
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
throws
PhpfastcacheSimpleCacheException
Return values
string

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

getCss()

Get the element's css array

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

element's css array

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

getGoogleAuthenticator()

gets google authenticator service

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

getGuzzle()

gets guzzle service

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

getHeadJs()

gets head js

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

getHeadJsScripts()

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

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

getJs()

gets js elements

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

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

renderHeadCSS()

public renderHeadCSS() : string
Return values
string

renderHeadInlineJS()

gets inline js for head

public renderHeadInlineJS() : string
Tags
throws
DependencyException
throws
NotFoundException
Return values
string

renderHeadJsScripts()

public renderHeadJsScripts() : string
Return values
string

renderPageInlineCSS()

gets inline css

public renderPageInlineCSS() : string
Tags
throws
DependencyException
throws
NotFoundException
Return values
string

renderPageInlineJS()

gets inline js

public renderPageInlineJS() : string
Tags
throws
DependencyException
throws
NotFoundException
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

encapsulateJs()

encapsulate js into jquery ready function

protected encapsulateJs(array<string|int, mixed> $js_array[, string $jquery_var_name = 'jQuery' ]) : string
Parameters
$js_array : array<string|int, mixed>
$jquery_var_name : string = 'jQuery'
Return values
string

generateHeadJs()

generate the js string

protected generateHeadJs() : string
Return values
string

the js into a jquery sandbox

generateJs()

generate the js string

protected generateJs([string|null $position = null ]) : string
Parameters
$position : string|null = null
Return values
string

the js into a jquery sandbox

generatePageJs()

generate the js string

protected generatePageJs() : string
Return values
string

the js into a jquery sandbox

getService()

gets registered service

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

isUrl()

protected isUrl(mixed $string) : bool
Parameters
$string : mixed
Return values
bool

minifyJs()

minify js string

protected minifyJs(string $js) : string
Parameters
$js : string

javascript minify

Return values
string

        
On this page

Search results