Form_Category_Query::parse_results_collection()

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

Description

Return

(awsmug\Torro_Forms\DB_Objects\Form_Categories\Form_Category_Collection) Results as a collection.

Source

File: src/db-objects/form-categories/form-category-query.php

	protected function parse_results_collection() {
		$ids = null !== $this->original->terms ? $this->original->terms : array();
		$fields = $this->original->query_vars['fields'];

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

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

Changelog

Changelog
Version Description
1.0.0 Introduced.