Actions

API16

Difference between revisions of "JForm/loadFolder"

From Joomla! Documentation

< API16:JForm
(New page: ===Description=== Method to load form descriptions from a complete folder. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JForm/loadFolder|Edit Desc...)
 
m (removing red link to edit, no existant pages)
 
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JForm/loadFolder|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JForm/loadFolder}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 56: Line 56:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JForm/loadFolder|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JForm/loadFolder}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 71: Line 71:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API16]]

Latest revision as of 21:53, 13 May 2013

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Method to load form descriptions from a complete folder.

[<! removed edit link to red link >]

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

Syntax

loadFolder($name)
Parameter Name Default Value Description
$name $name The prefix-name of the XML files

Returns

boolean True on success, false otherwise.

Defined in

libraries/joomla/form/form.php

Importing

jimport( 'joomla.form.form' );

Source Body

public function loadFolder($name)
{
        $return = false;
 
        jimport('joomla.filesystem.folder');
        $files = array();
        foreach($this->addFormPath() as $path)
        {
                $temp_files = JFolder::files($path, $name, false, true);
                if(is_array($temp_files)) $files = array_merge($temp_files, $files);
        }
        if (count($files)) {
                foreach($files as $file) {
                        $result = $this->load($file, true, true);
                }
        } else {
                $result = true;
        }
 
        return $result;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />