JElementTextarea/fetchElement: Difference between revisions
From Joomla! Documentation
New page:
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
{{Description:JElementTe... |
m preparing for archive only |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[< | <nowiki>[<! removed edit link to red link >]</nowiki> | ||
</span> | </span> | ||
<! removed transcluded page call, red link never existed > | |||
===Syntax=== | ===Syntax=== | ||
| Line 23: | Line 22: | ||
| | | | ||
|- | |- | ||
| | | &$node | ||
| | | | ||
| | | | ||
| Line 52: | Line 51: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[< | <nowiki>[<! removed edit link to red link >]</nowiki> | ||
</span> | </span> | ||
<! removed transcluded page call, red link never existed > | |||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=fetchElement | category=fetchElement | ||
category=JElementTextarea | category=JElementTextarea | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
[[Category:Archived pages API15]] | |||
Latest revision as of 00:34, 25 March 2017
[<! removed edit link to red link >]
<! 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
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 edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples