REST_Containers_Controller::get_item_schema()

Retrieves the model’s schema, conforming to JSON Schema.

Description

Return

(array) Model schema data.

Source

File: src/db-objects/containers/rest-containers-controller.php

	public function get_item_schema() {
		$schema = parent::get_item_schema();

		$schema['properties']['form_id'] = array(
			'description' => __( 'ID of the form this container belongs to.', 'torro-forms' ),
			'type'        => 'integer',
			'minimum'     => 1,
			'context'     => array( 'view', 'edit', 'embed' ),
			'arg_options' => array(
				'minimum' => 1,
			),
		);

		$schema['properties']['sort'] = array(
			'description' => __( 'Numeric value to determine the order within a list of multiple containers.', 'torro-forms' ),
			'type'        => 'integer',
			'context'     => array( 'view', 'edit', 'embed' ),
		);

		return $schema;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.