Text editor buttons 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 show text editor buttons

actionPrintFooterScripts() : void
access public

Add button for text editor

addButton(string $id, string $title, string $helpText, string $codeBegin, string $codeEnd, integer $priority = 0, string $accessKey = '') : void
access public

Parameters

$id

string

Button id; must be unique for this project

$title

string

Button title

$helpText

string

Help text for button

$codeBegin

string

Begin of code added after clicking on button

$codeEnd

string

End of code added after clicking on button

$priority

integer

Button priority - default: empty

$accessKey

string

Access key - default: empty

Check if button for text editor exists

checkButton(string $id) : boolean
access public

Parameters

$id

string

Button for text editor identifier

Returns

booleanButton for text editor exists (true) or not (false)

Get button for text editor data by id

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

Parameters

$id

string

Button for text editor identifier

Returns

arraybooleanButton for text editor data or false if not exists; button for text editor data have the following fields: "accesskey" (string type; access key), "codebegin" (string type; begin of code added after clicking on button), "codeend" (string type; end of code added after clicking on button), "helptext" (string type; help text for button), "title" (string type; button title)

Get buttons for text editor data

getButtons() : array
access public

Returns

arrayButtons for text editor data; each button for text editor data has the following fields: "accesskey" (string type; access key), "codebegin" (string type; begin of code added after clicking on button), "codeend" (string type; end of code added after clicking on button), "helptext" (string type; help text for button), "title" (string type; button title)

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

Remove button for text editor

removeButton(string $id) : void
access public

Parameters

$id

string

Button for text editor identifier

 Properties

 

Buttons

$buttons : array

Default

array()
access private
 

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

$projectObj : object

Default

NULL
access private