CodeMirrorEditorTransformationPlugin
abstract class CodeMirrorEditorTransformationPlugin extends IOTransformationsPlugin (View source)
Provides common methods for all the CodeMirror syntax highlighted editors
Properties
protected bool | $success | Specifies whether transformation was successful or not. |
from IOTransformationsPlugin |
protected string | $error | To store the error message in case of failed transformations. |
from IOTransformationsPlugin |
Methods
Returns true if the element requires no wrapping
Returns passed options or default values if they were not set
Returns the html for input field to override default textarea.
Returns the array of scripts (filename) required for plugin initialization and handling
Does the actual work of each specific transformations plugin.
Details
bool
applyTransformationNoWrap(array $options = [])
Returns true if the element requires no wrapping
array
getOptions(array $options, array $defaults)
Returns passed options or default values if they were not set
string
getInputHtml(string $columnNameAppendix, array $options, string $value, int $fieldIndex)
Returns the html for input field to override default textarea.
Note: Return empty string if default textarea is required.
array
getScripts()
Returns the array of scripts (filename) required for plugin initialization and handling
string
getError()
Returns the error message
bool
isSuccess()
Returns the success status
void
reset()
Resets the object properties
string
applyTransformation(string $buffer, array $options = [], FieldMetadata|null $meta = null)
Does the actual work of each specific transformations plugin.