API16

JElementTextarea/fetchElement: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
No edit summary
m preparing for archive only
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<! removed transcluded page call, red link never existed >
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JElementTextarea/fetchElement|Edit Descripton]]<nowiki>]</nowiki>
</span>
 
{{Description:JElementTextarea/fetchElement}}


===Syntax===
===Syntax===
Line 51: Line 46:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JElementTextarea/fetchElement|Edit See Also]]<nowiki>]</nowiki>
<! removed transcluded page call, red link never existed >
</span>
{{SeeAlso:JElementTextarea/fetchElement}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=fetchElement
  category=fetchElement
  category=JElementTextarea
  category=JElementTextarea
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>
[[Category:Archived pages API16]]

Latest revision as of 01:36, 25 March 2017

<! removed transcluded page call, red link never existed >

Syntax

fetchElement($name, $value, &$node, $control_name)
Parameter Name Default Value Description
$name
$value
&$node
$control_name

Defined in

libraries/joomla/html/parameter/element/textarea.php

Importing

jimport( 'joomla.html.parameter.element.textarea' );

Source Body

public function fetchElement($name, $value, &$node, $control_name)
{
        $rows = $node->attributes('rows');
        $cols = $node->attributes('cols');
        $class = ($node->attributes('class') ? 'class="'.$node->attributes('class').'"' : 'class="text_area"');
        // convert <br /> tags so they are not visible when editing
        $value = str_replace('<br />', "\n", $value);

        return '<textarea name="'.$control_name.'['.$name.']" cols="'.$cols.'" rows="'.$rows.'" '.$class.' id="'.$control_name.$name.'" >'.$value.'</textarea>';
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples