Submission::set_current_container( awsmug\Torro_Forms\DB_Objects\Containers\Container|null $container )

Sets the current container for the submission.

Description

The form ID of the container must match the submission’s form ID.

See also

Parameters

$container

(awsmug\Torro_Forms\DB_Objects\Containers\Container|null) (Required) Container, or null if the current container data should be unset.

Source

File: src/db-objects/submissions/submission.php

	public function set_current_container( $container ) {
		if ( null === $container ) {
			$this->__set( 'current_container_id', null );
			return true;
		}

		if ( $container->form_id !== $this->form_id ) {
			return false;
		}

		$this->__set( 'current_container_id', $container->id );
		return true;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.