Form::get_containers( array $args = array() )

Returns all containers that belong to the form.

Description

See also

Parameters

$args

(array) (Optional) Additional query arguments.

Default value: array()

Return

(awsmug\Torro_Forms\DB_Objects\Containers\Container_Collection) List of containers.

Source

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

	public function get_containers( $args = array() ) {
		if ( empty( $this->original->ID ) ) {
			return $this->manager->get_child_manager( 'containers' )->get_collection( array(), 0, 'objects' );
		}

		$args = wp_parse_args( $args, array(
			'number'  => -1,
			'form_id' => $this->original->ID,
		) );

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

Changelog

Changelog
Version Description
1.0.0 Introduced.