interface acp_utils_interface

Constants

BBCODE_STATUS_INVALID_DEFINITION

There is an issue with the definition

BBCODE_STATUS_INVALID_TEMPLATE

There is an issue with the template

BBCODE_STATUS_SAFE

The BBCode is valid and can be safely used by anyone

BBCODE_STATUS_UNSAFE

The BBCode is valid but may be unsafe to use

Methods

array
analyse_bbcode(string $definition, string $template)

Analyse given BBCode definition for issues and safeness

Details

at line 53
array analyse_bbcode(string $definition, string $template)

Analyse given BBCode definition for issues and safeness

Required elements in the return array:

  • status: see BBCODESTATUS* constants

Optional elements in the return array:

  • name: Name of the BBCode based on the definition. Required if status is "safe".
  • errortext: Textual description of the issue in plain text or as a L* string.
  • error_html: Visual description of the issue in HTML.

Parameters

string $definition

BBCode definition, e.g. [b]{TEXT}[/b]

string $template

BBCode template, e.g. {TEXT}

Return Value

array