Actions

API16

JForm/loadFolder

< API16:JForm

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

Method to load form descriptions from a complete folder.


<! 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 transcluded page call, red link never existed >

Examples

Code Examples


Advertisement