Summary
- File
- Package hierarchy Form\field
- Class hierarchy \AbstractFormField \FormFieldMultiLineTextEditor \FormFieldRichTextEditor
This class represents a rich text editor.
This class represents a rich text editor.
__construct(string $id, string $label, string $value, array<mixed,string> $field_options = array(), array<mixed,\FormFieldConstraint> $constraints = array())
Constructs a rich text edit field.
In addition to the parameters of the FormMultiLineEdit ones, there is the formatter which is an instance of the ContentFormattingFactory which ensures the formatting. The default value corresponds to the user's default configuration and will be the one to use 99% of the time.
| string | $id | Field id |
| string | $label | Field label |
| string | $value | Default value |
| array<mixed,string> | $field_options | options |
| array<mixed,\FormFieldConstraint> | $constraints | The constraints |
| None found |
display() : string
{@inheritdoc}
The html code for the textarea.
| None found |
get_id() : string
Returns the id.
| None found |
set_id(string $id)
Sets the id
| string | $id | The id. |
| None found |
get_form_id()
{@inheritdoc}
| None found |
set_form_id( $form_id)
Sets the id prefix
| $form_id |
| None found |
set_fieldset_id( $fieldset_id)
Sets the if of the fieldset which contains the field
| $fieldset_id | id of the fieldset |
| None found |
get_label() : string
Returns the label
The label
| None found |
set_label(string $label)
Sets the label
| string | $label | The label |
| None found |
get_description() : string
Returns the description
the description
| None found |
set_description(string $description)
Sets the description
| string | $description | The description |
| None found |
get_value()
{@inheritdoc}
| None found |
set_value( $value)
{@inheritdoc}
| $value |
| None found |
is_required() : true
Tells whether the field is required
if it is, false otherwise
| None found |
set_required(boolean $required)
Changes the fact that the field is required or not.
| boolean | $required | true if it's required, false otherwise |
| None found |
validate() : boolean
Validates the field by cheching if all the constraints are satisfied.
true if the form is valid
| None found |
get_validation_error_message()
Returns validation error message.
| None found |
set_validation_error_message(string $error_message)
Set the validation error message.
| string | $error_message | The message to set |
| None found |
retrieve_value()
{@inheritdoc}
| None found |
get_html_id() : string
Returns the effective HTML id.
| None found |
add_constraint(\FormFieldConstraint $constraint)
Adds a constraint to the field constraints.
| \FormFieldConstraint | $constraint | The constraint to add |
| None found |
add_form_constraint(\FormConstraint $constraint)
Add javascript code on the onblur field parameter that makes validation
| \FormConstraint | $constraint |
| None found |
has_constraints() : boolean
Return true if the field has one or more constraints, false otherwise.
| None found |
get_js_validations() : string
Returns the javascript onsubmit code.
The javascript code that makes the validation when the form is submitted
| None found |
get_onblur_validation()
| None found |
add_event( $event, $handler)
| $event | ||
| $handler |
| None found |
is_disabled() : boolean
Tells whether the field is disabled
| None found |
disable()
Disabled the field
| None found |
enable()
Enables the field
| None found |
is_select_to_list()
| None found |
transformed_select()
| None found |
not_transformed_select()
| None found |
is_readonly()
| None found |
set_readonly( $readonly)
| $readonly |
| None found |
is_hidden()
| None found |
set_hidden( $hidden)
| $hidden |
| None found |
has_pattern()
| None found |
set_pattern( $pattern)
| $pattern |
| None found |
has_placeholder()
| None found |
set_placeholder( $placeholder)
| $placeholder |
| None found |
set_template(\Template $template)
| \Template | $template |
| None found |
get_onblur_validations()
| None found |
compute_options(array $field_options)
| array | $field_options |
| None found |
get_default_template() : \Template
| None found |
assign_common_template_variables(\Template $template)
| \Template | $template |
| None found |
get_css_class()
| None found |
set_css_class( $css_class)
| $css_class |
| None found |
get_css_field_class()
| None found |
set_css_field_class( $css_field_class)
| $css_field_class |
| None found |
get_css_form_field_class()
| None found |
set_css_form_field_class( $css_form_field_class)
| $css_form_field_class |
| None found |
set_disabled( $disabled)
| $disabled |
| None found |
set_select_to_list( $select_to_list)
| $select_to_list |
| None found |
get_template_to_use() : \Template
| None found |
get_js_specialization_code()
| None found |
assign_textarea_template_variables(\Template $template)
| \Template | $template |
| None found |
get_related_fields()
| None found |
assign_editor(\Template $template)
| \Template | $template |
| None found |
get_preview_button_code()
| None found |
get_reset_button_code()
| None found |
parse_value( $value)
| $value |
| None found |
get_raw_value()
| None found |
set_raw_value( $value)
| $value |
| None found |
unparse_value( $value)
| $value |
| None found |
$rows :
| None found |
$cols :
| None found |
$id : string
| None found |
$label : string
| None found |
$description : string
| None found |
$value : string
| None found |
$disabled : boolean
| None found |
$select_to_list : boolean
| None found |
$hidden : boolean
| None found |
$readonly : boolean
| None found |
$css_class : string
| None found |
$css_field_class : string
| None found |
$css_form_field_class : string
| None found |
$required : string
| None found |
$pattern : string
| None found |
$placeholder : string
| None found |
$validation_error_message : string
| None found |
$constraints : array<mixed,\FormFieldConstraint>
| None found |
$form_constraints : array<mixed,\FormConstraint>
| None found |
$template : \Template
| None found |
$events : \string[string]
| None found |
$form_id : string
| None found |
$fieldset_id : string
| None found |
$formatter : \ContentFormattingFactory
| None found |
$reset_value :
| None found |