Visual 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

Add button for visual editor

addButton(string $id, string $filenameJS, string $filenamePhp = '') : void
access public

Parameters

$id

string

Button id; must be unique for this project

$filenameJS

string

JavaScript filename

$filenamePhp

string

PHP filename - default: empty

Check if button for visual editor exists

checkButton(string $id) : boolean
access public

Parameters

$id

string

Button for visual editor identifier

Returns

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

Filter for TinyMCE buttons

filterMceButtons(array $buttons) : array
access public

Parameters

$buttons

array

Buttons list

Returns

arrayButtons list

Filter for TinyMCE plugins languages

filterMceExternalLanguages(array $languages) : array
access public

Parameters

$languages

array

Plugins languages list

Returns

arrayPlugins languages list

Filter for TinyMCE plugins

filterMceExternalPlugins(array $plugins) : array
access public

Parameters

$plugins

array

Plugins list

Returns

arrayPlugins list

Get button for visual editor data by id

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

Parameters

$id

string

Button for visual editor identifier

Returns

arraybooleanButton for visual editor data or false if not exists; button for visual editor data have the following fields: "filenamejs" (string type; JavaScript filename), "filenamephp" (string type; PHP filename)

Get buttons for visual editor data

getButtons() : array
access public

Returns

arrayButtons for visual editor data; each button for visual editor data has the following fields: "filenamejs" (string type; JavaScript filename), "filenamephp" (string type; PHP filename)

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 visual editor

removeButton(string $id) : void
access public

Parameters

$id

string

Button for visual editor identifier

 Properties

 

Buttons

$buttons : array

Default

array()
access private
 

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

$projectObj : object

Default

NULL
access private