API16

JElementLanguages/fetchElement: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JElementL...
 
Doxiki (talk | contribs)
No edit summary
Line 23: Line 23:
|   
|   
|-
|-
|  
| &$node
|  
|  
|   
|   

Revision as of 10:16, 30 March 2010

[Edit Descripton]

Template:Description:JElementLanguages/fetchElement

Syntax

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

Defined in

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

Importing

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

Source Body

public function fetchElement($name, $value, &$node, $control_name)
{
        $client = $node->attributes('client');

        jimport('joomla.language.helper');
        $languages = JLanguageHelper::createLanguageList($value, constant('JPATH_'.strtoupper($client)), true);
        array_unshift($languages, JHtml::_('select.option', '', '- '.JText::_('SELECT_LANGUAGE').' -'));

        return JHtml::_('select.genericlist', $languages, $control_name .'['. $name .']',
                array(
                        'id' => $control_name.$name,
                        'list.attr' => 'class="inputbox"',
                        'list.select' => $value
                )
        );
}

[Edit See Also] Template:SeeAlso:JElementLanguages/fetchElement

Examples

<CodeExamplesForm />