Retrieves the model’s schema, conforming to JSON Schema.
Description
See also
Return
(array) Model schema data.
Source
File: src/db-objects/element-choices/rest-element-choices-controller.php
public function get_item_schema() { $schema = parent::get_item_schema(); $schema['properties']['element_id'] = array( 'description' => __( 'ID of the element this element choice 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 element choices.', 'torro-forms' ), 'type' => 'integer', 'context' => array( 'view', 'edit', 'embed' ), ); $schema['properties']['field'] = array( 'description' => __( 'Element type field identifier the element choice is associated with, if not the main field.', 'torro-forms' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), ); return $schema; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |