Element::get_element_choices( array $args = array() )

Returns all element choices that belong to the element.

Description

See also

Parameters

$args

(array) (Optional) Additional query arguments.

Default value: array()

Return

(awsmug\Torro_Forms\DB_Objects\Element_Choices\Element_Choice_Collection) List of element choices.

Source

File: src/db-objects/elements/element.php

	public function get_element_choices( $args = array() ) {
		if ( empty( $this->id ) ) {
			return $this->manager->get_child_manager( 'element_choices' )->get_collection( array(), 0, 'objects' );
		}

		$args = wp_parse_args( $args, array(
			'number'     => -1,
			'element_id' => $this->id,
		) );

		return $this->manager->get_child_manager( 'element_choices' )->query( $args );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.