Constants

DATA_PREFIX

DATA_PREFIX

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

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

Methods

setAttribute()

setAttribute(string  $key, string  $value, boolean  $appendValue = true, string  $appendSpacer = ' ') : void

Sets an attribute. If $appendValue is true, the value is going to be appended with the $appendSpacer argument.

Parameters

string $key
string $value
boolean $appendValue
string $appendSpacer

setAttributes()

setAttributes(array  $attributes, boolean  $appendValue = true, string  $appendSpacer = ' ') 

Sets an array of attributes. If $appendValue is true, the value is going to be appended with the $appendSpacer argument.

Parameters

array $attributes
boolean $appendValue
string $appendSpacer

setDataAttribute()

setDataAttribute(string  $key, string  $value) : void

Sets a data attribute. Data attributes will always be overwritten.

Parameters

string $key
string $value

hasAttribute()

hasAttribute(string  $key) : boolean

Returns true if attribute is set.

Parameters

string $key

Returns

boolean

hasDataAttribute()

hasDataAttribute(string  $key) : boolean

Returns true if data attribute is set.

Parameters

string $key

Returns

boolean

getAttribute()

getAttribute(string  $key) : string|object

Returns attribute.

Parameters

string $key

Returns

string|object

getAttributeValue()

getAttributeValue(  $key) : string|null

Returns attribute value

Parameters

$key

Returns

string|null

getDataAttribute()

getDataAttribute(string  $key) : string

Returns data attribute.

Parameters

string $key

Returns

string

removeAttribute()

removeAttribute(string  $key) : void

Removes an attribute.

Parameters

string $key

removeDataAttribute()

removeDataAttribute(string  $key) : void

Removes a data attribute.

Parameters

string $key

createAttribute()

createAttribute(string  $key, string  $value) : \stdClass

Returns an attribute object.

Parameters

string $key
string $value

Returns

\stdClass

prepareAttribute()

prepareAttribute(string  $value) : string

Prepares an attribute (strips double quotes)

Parameters

string $value

Returns

string

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

_getTemplatePath()

_getTemplatePath() : string

Returns path to template.

Returns

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

_createIconFromNavItem()

_createIconFromNavItem(\Fuman_Navigation_Item  $item, string  $class = '', null  $iconPath = null) : \app_core_component_icon

Creates an breadcrumb item.

Parameters

\Fuman_Navigation_Item $item
string $class
null $iconPath

Returns

\app_core_component_icon