public function get_field_in_group( $field_group, $sub_field ) {
		if ( ! $field_group instanceof Field_Contract ) {
			$field_group = $this->get_field( $field_group );
		}

		if ( ! $field_group || 'group' !== $field_group->get_type() ) {
			return null;
		}

		$sub_fields = $field_group->prop( 'fields', [] );

		if ( ! array_key_exists( $sub_field, $sub_fields ) ) {
			return null;
		}

		return $this->get_new_field( $sub_fields[ $sub_field ], $field_group );
	}
public function get_field_in_group( $field_group, $sub_field ) {
		if ( ! $field_group instanceof Field_Contract ) {
			$field_group = $this->get_field( $field_group );
		}

		if ( ! $field_group || 'group' !== $field_group->get_type() ) {
			return null;
		}

		$sub_fields = $field_group->prop( 'fields', [] );

		if ( ! array_key_exists( $sub_field, $sub_fields ) ) {
			return null;
		}

		return $this->get_new_field( $sub_fields[ $sub_field ], $field_group );
	}
public function get_field_in_group ( $ field_group , $ sub_field ) { if ( ! $ field_group instanceof Field_Contract ) { $ field_group = $ this -> get_field ( $ field_group ) ; } if ( ! $ field_group || 'group' !== $ field_group -> get_type ( ) ) { return null ; } $ sub_fields = $ field_group -> prop ( 'fields' , [ ] ) ; if ( ! array_key_exists ( $ sub_field , $ sub_fields ) ) { return null ; } return $ this -> get_new_field ( $ sub_fields [ $ sub_field ] , $ field_group ) ; }
Gets a field in a group.

@param \WPLibs\Form\Contracts\Field|string $field_group
@param string                              $sub_field
@return \WPLibs\Form\Contracts\Field|null
Gets a field in a group .