english/libraries/joomla/form/form.php
/**
	 * Method to synchronize any field, form or rule paths contained in the XML document.
	 *
	 * @return  boolean  True on success.
	 *
	 * @since   11.1
	 * @todo    Maybe we should receive all addXXXpaths attributes at once?
	 */
Method to synchronize any field, form or rule paths contained in the XML document.
@return  boolean  True on success.


Method to synchronize any field form or rule paths contained in the XML document . @return boolean True on success .
protected function syncPaths()
	{
		if (!($this->xml instanceof JXMLElement)) {
			return false;
		}
		$paths = $this->xml->xpath('//*[@addfieldpath]/@addfieldpath');
		$paths = array_map('strval', $paths ? $paths : array());
		foreach ($paths as $path)
		{
			$path = JPATH_ROOT.'/'.ltrim($path, '/\\');
			self::addFieldPath($path);
		}
		$paths = $this->xml->xpath('//*[@addformpath]/@addformpath');
		$paths = array_map('strval', $paths ? $paths : array());
		foreach ($paths as $path)
		{
			$path = JPATH_ROOT.'/'.ltrim($path, '/\\');
			self::addFormPath($path);
		}
		$paths = $this->xml->xpath('//*[@addrulepath]/@addrulepath');
		$paths = array_map('strval', $paths ? $paths : array());
		foreach ($paths as $path)
		{
			$path = JPATH_ROOT.'/'.ltrim($path, '/\\');
			self::addRulePath($path);
		}
		return true;
	}
protected function syncPaths ( ) { if ( ! ( $ this -> xml instanceof JXMLElement ) ) { return false ; } $ paths = $ this -> xml -> xpath ( '//*[@addfieldpath]/@addfieldpath' ) ; $ paths = array_map ( 'strval' , $ paths ? $ paths : array ( ) ) ; foreach ( $ paths as $ path ) { $ path = JPATH_ROOT . '/' . ltrim ( $ path , '/\\' ) ; self :: addFieldPath ( $ path ) ; } $ paths = $ this -> xml -> xpath ( '//*[@addformpath]/@addformpath' ) ; $ paths = array_map ( 'strval' , $ paths ? $ paths : array ( ) ) ; foreach ( $ paths as $ path ) { $ path = JPATH_ROOT . '/' . ltrim ( $ path , '/\\' ) ; self :: addFormPath ( $ path ) ; } $ paths = $ this -> xml -> xpath ( '//*[@addrulepath]/@addrulepath' ) ; $ paths = array_map ( 'strval' , $ paths ? $ paths : array ( ) ) ; foreach ( $ paths as $ path ) { $ path = JPATH_ROOT . '/' . ltrim ( $ path , '/\\' ) ; self :: addRulePath ( $ path ) ; } return true ; }
Method to synchronize any field, form or rule paths contained in the XML document.
Method to synchronize any field form or rule paths contained in the XML document .
// Make sure there is a valid JForm XML document. // Get any addfieldpath attributes from the form definition. // Add the field paths. // Get any addformpath attributes from the form definition. // Add the form paths. // Get any addrulepath attributes from the form definition. // Add the rule paths.