Constants

JAVASCIPT_LOAD_TYPE_DEFAULT

JAVASCIPT_LOAD_TYPE_DEFAULT

JAVASCIPT_LOAD_TYPE_EXTERNAL

JAVASCIPT_LOAD_TYPE_EXTERNAL

JAVASCIPT_LOAD_TYPE_EXTERNAL_ASYNC

JAVASCIPT_LOAD_TYPE_EXTERNAL_ASYNC

SESSION_CONTAINER_NAME

SESSION_CONTAINER_NAME

Properties

$_data

$_data : \stdClass

Data for template

Type

\stdClass

$_templatePath

$_templatePath : string

Path to the template file (*.phtml, .

..)

Type

string

$_jsFiles

$_jsFiles : array

List of required JS files

Type

array

$_jsProperties

$_jsProperties : array

List of JS properties

Type

array

$_cssFiles

$_cssFiles : array

List of required CSS files

Type

array

$_jsClasses

$_jsClasses : array

List of required JS classes

Type

array

$_lockIds

$_lockIds : array

List of lock ids

Type

array

$_isFrontend

$_isFrontend : boolean

Is this response used for frontend

Type

boolean

$_name

$_name : string

Name of theme

Type

string

$_webPath

$_webPath : string

Web path to theme

Type

string

$_path

$_path : string

Filesystem path of theme

Type

string

$_webRoot

$_webRoot : string

Root Web Path

Type

string

$_language

$_language : string

Get language

Type

string

$_languageDirection

$_languageDirection : string

Language direction

Type

string

$_pageTitle

$_pageTitle : string

Page Title

Type

string

Methods

__construct()

__construct(null|string  $name = null) : \Fuman_Theme

Constructor

Parameters

null|string $name

Returns

\Fuman_Theme

setFrontend()

setFrontend(boolean  $flag) 

Sets frontend flag for object If already set, method call will be ignored

Parameters

boolean $flag

isFrontend()

isFrontend() : boolean

Is object for a frontend request

Returns

boolean

addCssFile()

addCssFile(string  $path, string  $media = 'all', string|null  $packageName = null) : \Fuman_Response_Data

Add a CSS file

Parameters

string $path
string $media
string|null $packageName

Used for pack.php

Returns

\Fuman_Response_Data

addCssFiles()

addCssFiles(array  $cssFiles) : void

Adds an array of cssFiles the files will be internally added to the root response data object

Parameters

array $cssFiles

getCssFiles()

getCssFiles() : array

Returns all CSS files

Returns

array

hasCssFiles()

hasCssFiles() : boolean

Returns true when more than 0 css files are set

Returns

boolean

addJsFile()

addJsFile(string  $path, integer  $javaScriptLoadType, string|null  $packageName = null) : \Fuman_Response_Data

Add a Js file

Parameters

string $path
integer $javaScriptLoadType
string|null $packageName

Used for pack.php

Returns

\Fuman_Response_Data

addJsFiles()

addJsFiles(array  $jsFiles, boolean  $toTop = false) : void

Adds an array of jsFiles the files will be internally added to the root response data object

Parameters

array $jsFiles
boolean $toTop

setJsFiles()

setJsFiles(array  $jsFiles) 

Set js files

Parameters

array $jsFiles

getJsFiles()

getJsFiles() : array

Returns all js files

Returns

array

hasJsFiles()

hasJsFiles() : boolean

Does the object contains js files

Returns

boolean

addJsClass()

addJsClass(string  $jsClassName, null|\stdClass  $options = null) : void

Adds an array of jsFiles the files will be internally added to the root response data object

Parameters

string $jsClassName
null|\stdClass $options

addJsClasses()

addJsClasses(array  $jsClasses) : void

Adds js classes

Parameters

array $jsClasses

hasJSClasses()

hasJSClasses() : boolean

Has javascript class

Returns

boolean

getJsClasses()

getJsClasses() : array

Get javascript classes

Returns

array

setJsClasses()

setJsClasses(array  $jsClasses) 

Set javascript classes

Parameters

array $jsClasses

addJsProperty()

addJsProperty(string  $key, \stdClass|string  $value) : void

Adds JS properties the properties will be internally added to the root response data object

Parameters

string $key
\stdClass|string $value

getJsProperties()

getJsProperties() : array

Returns all js properties

Returns

array

hasJsProperties()

hasJsProperties() : boolean

Does the object contains js properties

Returns

boolean

addLockId()

addLockId(integer  $lockId) : void

Add lock id

Parameters

integer $lockId

hasLockIds()

hasLockIds() : boolean

Has lock ids

Returns

boolean

getLockIds()

getLockIds() : \array[int]

Get lock ids

Returns

\array[int]

getTemplatePath()

getTemplatePath() : string

Gets the script path

Returns

string

hasTemplatePath()

hasTemplatePath() : boolean

Has script path

Returns

boolean

setTemplatePath()

setTemplatePath(string  $templatePath) : \Fuman_Response_Data

Sets script path

Parameters

string $templatePath

Returns

\Fuman_Response_Data

getData()

getData() : null|\stdClass

Gets data object

Returns

null|\stdClass

setData()

setData(\stdClass  $data) : void

Sets data object

Parameters

\stdClass $data

hasData()

hasData() : boolean

Has data object

Returns

boolean

getValue()

getValue(string  $key) : object|string

Gets value

Parameters

string $key

Returns

object|string

hasValue()

hasValue(string  $key) : boolean

Has value

Parameters

string $key

Returns

boolean

setValue()

setValue(string  $key, mixed|object  $value) : void

Sets value

Parameters

string $key
mixed|object $value

__set()

__set(string  $key, object  $value) : void

Sets value on data

Parameters

string $key
object $value

__get()

__get(string  $key) : null

Gets value from data

Parameters

string $key

Returns

null

__isset()

__isset(string  $key) : boolean

Is set key on data

Parameters

string $key

Returns

boolean

toObject()

toObject() : \stdClass

Creates stdClass/object ot data object

Returns

\stdClass

init()

init(null|string  $name = null) 

Init

Parameters

null|string $name

Throws

\Fuman_Exception

getName()

getName() : string

Returns name of theme

Returns

string

getPath()

getPath() : string

Returns filesystem path to theme

Returns

string

getWebPath()

getWebPath() : string

Returns http path to theme

Returns

string

getLanguage()

getLanguage() : string

Gets language

Returns

string

getDirectionForLanguage()

getDirectionForLanguage() : string

Gets direction for language

Returns

string

setPageTitle()

setPageTitle(string  $pageTitle) : void

Sets html page title

Parameters

string $pageTitle

getPageTitle()

getPageTitle() : string

Gets html page title

Returns

string

getThemeJSClass()

getThemeJSClass() : null|string

Gets a list of javascript files

Returns

null|string

getTemplatePathForName()

getTemplatePathForName(string  $name) : string

Gets a template from theme (assets/)

Parameters

string $name

Throws

\Fuman_Exception

Returns

string

initResponse()

initResponse(\Fuman_Response_Data  $actionData) : void

Initializes the theme

Parameters

\Fuman_Response_Data $actionData

_addCSSFiles()

_addCSSFiles(\stdClass  $sessionContainer = null) 

Add CSS

Parameters

\stdClass $sessionContainer

_addJSFiles()

_addJSFiles(\stdClass  $sessionContainer = null) 

Add JS

Parameters

\stdClass $sessionContainer

setup()

setup() 

Setup theme to be used in parser

parse()

parse() : null|string

Parses theme

Returns

null|string

_compareCssFiles()

_compareCssFiles(\stdClass  $a, \stdClass  $b) : integer

Compares css files

Parameters

\stdClass $a
\stdClass $b

Returns

integer

_compareJsFiles()

_compareJsFiles(\stdClass  $a, \stdClass  $b) : integer

Compares JS files

Parameters

\stdClass $a
\stdClass $b

Returns

integer