JElementUserGroup/fetchElement: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
Line 63: | Line 63: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=fetchElement | category=fetchElement | ||
category=JElementUserGroup | category=JElementUserGroup | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* |
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/usergroup.php
Importing
jimport( 'joomla.html.parameter.element.usergroup' );
Source Body
public function fetchElement($name, $value, &$node, $control_name)
{
$ctrl = $control_name .'['. $name .']';
$attribs = ' ';
if ($v = $node->attributes('size')) {
$attribs .= 'size="'.$v.'"';
}
if ($v = $node->attributes('class')) {
$attribs .= 'class="'.$v.'"';
} else {
$attribs .= 'class="inputbox"';
}
if ($m = $node->attributes('multiple'))
{
$attribs .= 'multiple="multiple"';
$ctrl .= '[]';
//$value = implode('|',)
}
//array_unshift($editors, JHtml::_('select.option', '', '- '. JText::_('SELECT_EDITOR') .' -'));
return JHtml::_('access.usergroup', $ctrl, $value, $attribs, false);
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples