Configuration class

access public
package kocuj_internal_lib
inherited_from \KocujIL\V12a\Classes\ComponentObject

 Methods

Constructor

__construct(object $projectObj) : void
Inherited
access public

Parameters

$projectObj

object

\KocujIL\V12a\Classes\Project object for current project

Action for admin footer scripts

actionPrintFooterScripts() : void
access public

Add window

addWindow(string $id, string $title, integer $width, integer $height, integer $type = \KocujIL\V12a\Enums\Project\Components\All\Window\Type::STANDARD, array $attr = array()) : void
access public

Parameters

$id

string

Window identifier; must be unique

$title

string

Window title

$width

integer

Window width

$height

integer

Window height

$type

integer

Window type; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\All\Window\Type: STANDARD (for standard content) or AJAX (for AJAX content) - default: \KocujIL\V12a\Enums\Project\Components\All\Window\Type::STANDARD

$attr

array

Additional attributes; there are available the following attributes: "ajaxdata" (array type; data for AJAX request), "content" (string type; content for standard window; it works only if window type is set to \KocujIL\V12a\Enums\Project\Components\All\Window\Type::STANDARD), "contentcss" (array type; CSS styles for content), "url" (string type; URL for AJAX request; it works only if window type is set to \KocujIL\V12a\Enums\Project\Components\All\Window\Type::AJAX) - default: empty

Check if window exists

checkWindow(string $id) : boolean
access public

Parameters

$id

string

Window identifier

Returns

booleanWindow exists (true) or not (false)

Get object of class type from component

getComponent(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE, string $fragment = '') : object
Inherited
access public

Parameters

$type

string

Component type

$projectCategory

integer

Component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE

$fragment

string

Component fragment - default: empty

Returns

objectObject of class type from component

Get object of type \KocujIL\V12a\Classes\Project

getProjectObj() : object
Inherited
access public

Returns

objectObject of type \KocujIL\V12a\Classes\Project

Get object of class type for strings from component

getStrings(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE) : object
Inherited
access public

Parameters

$type

string

Component type

$projectCategory

integer

Component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE

Returns

objectObject of class type for strings from component

Get window data by id

getWindow(string $id) : array | boolean
access public

Parameters

$id

string

Window identifier

Returns

arraybooleanWindow data or false if not exists; window data have the following fields: "ajaxdata" (data for AJAX request), "content" (content for standard window), "contentcss" (CSS styles for content), "height" (window height), "type" (type of window), "url" (URL for AJAX request), "width" (window width)

Get window JavaScript code

getWindowJsCode(string $id) : string
access public

Parameters

$id

string

Window identifier

Returns

stringWindow JavaScript code

Get window JavaScript function with code

getWindowJsFunction(string $id, $functionName, string $forceSuffix = '') : string
access public

Parameters

$id

string

Window identifier

$functionName

$forceSuffix

string

Force JavaScript function suffix - default: empty

Returns

stringWindow JavaScript function with code

Get windows data

getWindows() : array
access public

Returns

arrayWindows data; each window data has the following fields: "ajaxdata" (data for AJAX request), "content" (content for standard window), "contentcss" (CSS styles for content), "height" (window height), "type" (type of window), "url" (URL for AJAX request), "width" (window width)

Remove window

removeWindow(string $id) : void
access public

Parameters

$id

string

Window identifier

 Properties

 

\KocujIL\V12a\Classes\Project object for current project

$projectObj : object

Default

NULL
access private
 

Windows

$windows : array

Default

array()
access private