english/libraries/joomla/form/helper.php
/**
	 * Method to load a form entity object given a type.
	 * Each type is loaded only once and then used as a prototype for other objects of same type.
	 * Please, use this method only with those entities which support types (forms don't support them).
	 *
	 * @param   string   $type  The entity type.
	 * @param   boolean  $new   Flag to toggle whether we should get a new instance of the object.
	 *
	 * @return  mixed  Entity object on success, false otherwise.
	 *
	 * @since   11.1
	 */
Method to load a form entity object given a type.
Each type is loaded only once and then used as a prototype for other objects of same type.
Please, use this method only with those entities which support types (forms don't support them).

@param   string   $type  The entity type.
@param   boolean  $new   Flag to toggle whether we should get a new instance of the object.

@return  mixed  Entity object on success, false otherwise.


Method to load a form entity object given a type . Each type is loaded only once and then used as a prototype for other objects of same type . Please use this method only with those entities which support types ( forms don ' t support them ) . @param string $type The entity type . @param boolean $new Flag to toggle whether we should get a new instance of the object . @return mixed Entity object on success false otherwise .
protected static function loadType($entity, $type, $new = true)
	{
		$types = &self::$entities[$entity];
		$key	= md5($type);
		$class	= '';
		if (isset($types[$key]) && $new === false) {
			return $types[$key];
		}
		if ( ($class = self::loadClass($entity, $type)) !== false) {
			$types[$key] = new $class;
			return $types[$key];
		}
		else {
			return false;
		}
	}
protected static function loadType ( $ entity , $ type , $ new = true ) { $ types = & self :: $ entities [ $ entity ] ; $ key = md5 ( $ type ) ; $ class = '' ; if ( isset ( $ types [ $ key ] ) && $ new === false ) { return $ types [ $ key ] ; } if ( ( $ class = self :: loadClass ( $ entity , $ type ) ) !== false ) { $ types [ $ key ] = new $ class ; return $ types [ $ key ] ; } else { return false ; } }
Method to load a form entity object given a type.
Method to load a form entity object given a type .
// Reference to an array with current entity's type instances // Initialize variables. // Return an entity object if it already exists and we don't need a new one. // Instantiate a new type object.