\Pluf_Form_Widget_TinyMCEInput

Textarea with TinyMCE addition.

Summary

Methods
Properties
Constants
__construct()
render()
valueFromFormData()
idForLabel()
$is_hidden
$needs_multipart_form
$input_type
$attrs
$tiny_mceurl
$mode
$theme
$include_tinymce
No constants found
buildAttrs()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$is_hidden

$is_hidden : 

Type

$needs_multipart_form

$needs_multipart_form : 

Type

$input_type

$input_type : 

Type

$attrs

$attrs : 

Type

$tiny_mceurl

$tiny_mceurl : 

Type

$mode

$mode : 

Type

$theme

$theme : 

Type

$include_tinymce

$include_tinymce : 

Type

Methods

__construct()

__construct(  $attrs = array()) 

Parameters

$attrs

render()

render(  $name,   $value,   $extra_attrs = array()) : string

Renders the HTML of the input.

Parameters

$name
$value
$extra_attrs

Returns

string —

The HTML string of the input.

valueFromFormData()

valueFromFormData(  $name,   $data) : mixed

A widget can split itself in multiple input form. For example you can have a datetime value in your model and you use 2 inputs one for the date and one for the time to input the value. So the widget must know how to get back the values from the submitted form.

Parameters

$name
$data

Returns

mixed —

Value or null if not defined.

idForLabel()

idForLabel(  $id) 

Returns the HTML ID attribute of this Widget for use by a <label>, given the ID of the field. Returns None if no ID is available.

This hook is necessary because some widgets have multiple HTML elements and, thus, multiple IDs. In that case, this method should return an ID value that corresponds to the first ID in the widget's tags.

Parameters

$id

buildAttrs()

buildAttrs(  $attrs,   $extra_attrs = array()) : array

Build the list of attributes for the form.

It should be called this way: $this->buildAttrs(array('name'=>$name, 'type'=>$this->input_type), $extra_attrs);

Parameters

$attrs
$extra_attrs

Returns

array —

The attributes for the field.