Documentation

Editor
in package
implements ArrayAccess uses ArrayAccessHelper

Creates the editor input box so that people can write messages to post.

Table of Contents

Interfaces

ArrayAccess

Constants

PREVIEW_HTML  = 1
PREVIEW_XML  = 2

Properties

$bbc_handlers  : string
$bbc_tags  : array<string|int, mixed>
$bbc_toolbar  : array<string|int, mixed>
$columns  : string
$disable_smiley_box  : string
$disabled_tags  : array<string|int, mixed>
$form  : string
$height  : string
$id  : string
$labels  : array<string|int, mixed>
$loaded  : array<string|int, mixed>
$locale  : string
$preview_type  : int
$required  : bool
$rich_active  : string
$rows  : string
$sce_options  : array<string|int, mixed>
$smileys_toolbar  : array<string|int, mixed>
$value  : string
$width  : string
$prop_aliases  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructor.
getMessageIcons()  : array<string|int, mixed>
Retrieves a list of message icons.
load()  : object
Static wrapper for constructor.
offsetExists()  : bool
Checks whether a property has been set when object is accessed as an array.
offsetGet()  : mixed
Gets properties when object is accessed as an array.
offsetSet()  : void
Sets properties when object is accessed as an array.
offsetUnset()  : void
Unsets properties when object is accessed as an array.
buildBbcToolbar()  : void
Initialize the BBC button toolbar, if not already loaded.
buildButtons()  : void
Builds the main editor form buttons (submit, preview, etc.)
buildSmileysToolbar()  : void
Initialize the smiley toolbar, if enabled and not already loaded.
init()  : void
Initializes some required template stuff.
setSCEditorOptions()  : void
Initialize the smiley toolbar, if enabled and not already loaded.

Constants

PREVIEW_HTML

public mixed PREVIEW_HTML = 1

PREVIEW_XML

public mixed PREVIEW_XML = 2

Properties

$bbc_handlers

public static string $bbc_handlers = ''

$bbc_tags

public static array<string|int, mixed> $bbc_tags = []

$bbc_toolbar

public static array<string|int, mixed> $bbc_toolbar = []

$columns

public string $columns

Column width of the editor's input area.

$disable_smiley_box

public string $disable_smiley_box

Whether to show the smiley box.

$disabled_tags

public static array<string|int, mixed> $disabled_tags = []

$form

public string $form

ID of the HTML form for this editor.

$height

public string $height

CSS height of the editor's input area.

$id

public string $id

This editor's ID string.

$labels

public array<string|int, mixed> $labels

Labels for the form's main buttons.

$loaded

public static array<string|int, mixed> $loaded = []

All loaded instances of this class.

$locale

public string $locale

The locale to use for the input form.

$preview_type

public int $preview_type

Which type of previews we want.

Value must be one of this class's PREVIEW_* constants.

$required

public bool $required

Whether input is required (i.e. submitted value cannot be empty).

$rich_active

public string $rich_active

Whether WYSIWYG mode is initially on or off.

$rows

public string $rows

Row height of the editor's input area.

$sce_options

public array<string|int, mixed> $sce_options = []

Options to pass to SCEditor.

$smileys_toolbar

public static array<string|int, mixed> $smileys_toolbar = ['postform' => [], 'popup' => []]

$value

public string $value

This editor's value.

$width

public string $width

CSS width of the editor's input area.

$prop_aliases

protected array<string|int, mixed> $prop_aliases = ['rich_value' => 'value']

Alternate names for some object properties.

Methods

__construct()

Constructor.

public __construct(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>

Various options for the editor.

getMessageIcons()

Retrieves a list of message icons.

public static getMessageIcons(int $board_id) : array<string|int, mixed>

Based on the settings, the array will either contain a list of default message icons or a list of custom message icons retrieved from the database.

The board_id is needed for the custom message icons (which can be set for each board individually).

Parameters
$board_id : int

The ID of the board

Return values
array<string|int, mixed>

An array of info about available icons

load()

Static wrapper for constructor.

public static load(array<string|int, mixed> $options) : object
Parameters
$options : array<string|int, mixed>

Various options for the editor.

Return values
object

An instance of this class.

offsetExists()

Checks whether a property has been set when object is accessed as an array.

public offsetExists(mixed $prop) : bool
Parameters
$prop : mixed

The property name.

Return values
bool

offsetGet()

Gets properties when object is accessed as an array.

public & offsetGet(mixed $prop) : mixed
Parameters
$prop : mixed

The property name.

Return values
mixed

A reference to the property.

offsetSet()

Sets properties when object is accessed as an array.

public offsetSet(mixed $prop, mixed $value) : void
Parameters
$prop : mixed

The property name.

$value : mixed

The value to set.

offsetUnset()

Unsets properties when object is accessed as an array.

public offsetUnset(mixed $prop) : void
Parameters
$prop : mixed

The property name.

buildBbcToolbar()

Initialize the BBC button toolbar, if not already loaded.

protected buildBbcToolbar() : void

buildButtons()

Builds the main editor form buttons (submit, preview, etc.)

protected buildButtons() : void

buildSmileysToolbar()

Initialize the smiley toolbar, if enabled and not already loaded.

protected buildSmileysToolbar() : void

init()

Initializes some required template stuff.

protected init() : void

Only acts the first time an instance of this class is created.

setSCEditorOptions()

Initialize the smiley toolbar, if enabled and not already loaded.

protected setSCEditorOptions() : void

        
On this page

Search results