public function getGroup($group, $nested = false)
	{
		// Initialise variables.
		$fields = array();

		// Get all of the field elements in the field group.
		$elements = $this->findFieldsByGroup($group, $nested);

		// If no field elements were found return empty.
		if (empty($elements))
		{
			return $fields;
		}

		// Build the result array from the found field elements.
		foreach ($elements as $element)
		{
			// Get the field groups for the element.
			$attrs  = $element->xpath('ancestor::fields[@name]/@name');
			$groups = array_map('strval', $attrs ? $attrs : array());
			$group  = implode('.', $groups);

			// If the field is successfully loaded add it to the result array.
			if ($field = $this->loadField($element, $group))
			{
				$fields[$field->id] = $field;
			}
		}

		return $fields;
	}
public function getGroup($group, $nested = false)
	{
		// Initialise variables.
		$fields = array();

		// Get all of the field elements in the field group.
		$elements = $this->findFieldsByGroup($group, $nested);

		// If no field elements were found return empty.
		if (empty($elements))
		{
			return $fields;
		}

		// Build the result array from the found field elements.
		foreach ($elements as $element)
		{
			// Get the field groups for the element.
			$attrs  = $element->xpath('ancestor::fields[@name]/@name');
			$groups = array_map('strval', $attrs ? $attrs : array());
			$group  = implode('.', $groups);

			// If the field is successfully loaded add it to the result array.
			if ($field = $this->loadField($element, $group))
			{
				$fields[$field->id] = $field;
			}
		}

		return $fields;
	}
public function getGroup ( $ group , $ nested = false ) { // Initialise variables. $ fields = array ( ) ; // Get all of the field elements in the field group. $ elements = $ this -> findFieldsByGroup ( $ group , $ nested ) ; // If no field elements were found return empty. if ( empty ( $ elements ) ) { return $ fields ; } // Build the result array from the found field elements. foreach ( $ elements as $ element ) { // Get the field groups for the element. $ attrs = $ element -> xpath ( 'ancestor::fields[@name]/@name' ) ; $ groups = array_map ( 'strval' , $ attrs ? $ attrs : array ( ) ) ; $ group = implode ( '.' , $ groups ) ; // If the field is successfully loaded add it to the result array. if ( $ field = $ this -> loadField ( $ element , $ group ) ) { $ fields [ $ field -> id ] = $ field ; } } return $ fields ; }
Method to get an array of Field objects in a given field group by name.

@param   string   $group   The dot-separated form group path for which to get the form fields.
@param   boolean  $nested  True to also include fields in nested groups that are inside of the group for which to find fields.
@return  array    The array of Field objects in the field group.
Method to get an array of Field objects in a given field group by name .