Form_Query::parse_results_collection()

Parses the results of the internal Core query into a collection.

Description

See also

Return

(awsmug\Torro_Forms\DB_Objects\Forms\Form_Collection) Results as a collection.

Source

File: src/db-objects/forms/form-query.php

	protected function parse_results_collection() {
		$ids = $this->original->posts;
		$fields = $this->original->query_vars['fields'];

		if ( 'ids' !== $fields ) {
			$ids = wp_list_pluck( $ids, 'ID' );
			$fields = 'objects';
		}

		return $this->create_collection( $ids, $this->original->found_posts, $fields );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.