Function __global->get_order_field
Definitions
sources/content2.php
- Get an order inputter.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $entry_type | ID_TEXT | No | No | required parameter | N/A | N/A | The type of resource being ordered |
| $category_type | ?ID_TEXT | No | No | required parameter | N/A | N/A | The type of resource being ordered within (null: no categories involved) |
| $current_order | ?integer | No | No | required parameter | N/A | N/A | The current order (null: new, so add to end) |
| $max | ?integer | No | No | Null | N/A | N/A | Maximum order field (null: work out from content type metadata) |
| $total | ?integer | No | No | Null | N/A | N/A | Number of entries, alternative to supplying $max (null: work out from content type metadata) |
| $order_field | ID_TEXT | No | No | order | N/A | N/A | The POST field to save under |
| $description | ?Tempcode | No | No | Null | N/A | N/A | Description for field input (null: {!ORDER}) |
| $num_automated_now | ?integer | No | No | Null | N/A | N/A | The number of records that are currently automated (null: work out) |
Returns
- Ordering field
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get an order inputter.
*
* @param ID_TEXT $entry_type The type of resource being ordered
* @param ?ID_TEXT $category_type The type of resource being ordered within (null: no categories involved)
* @param ?integer $current_order The current order (null: new, so add to end)
* @param ?integer $max Maximum order field (null: work out from content type metadata)
* @param ?integer $total Number of entries, alternative to supplying $max (null: work out from content type metadata)
* @param ID_TEXT $order_field The POST field to save under
* @param ?Tempcode $description Description for field input (null: {!ORDER})
* @param ?integer $num_automated_now The number of records that are currently automated (null: work out)
* @return Tempcode Ordering field
*/
function get_order_field(string $entry_type, ?string $category_type, ?int $current_order, ?int $max = null, ?int $total = null, string $order_field = 'order', ?object $description = null, ?int $num_automated_now = null) : object
* Get an order inputter.
*
* @param ID_TEXT $entry_type The type of resource being ordered
* @param ?ID_TEXT $category_type The type of resource being ordered within (null: no categories involved)
* @param ?integer $current_order The current order (null: new, so add to end)
* @param ?integer $max Maximum order field (null: work out from content type metadata)
* @param ?integer $total Number of entries, alternative to supplying $max (null: work out from content type metadata)
* @param ID_TEXT $order_field The POST field to save under
* @param ?Tempcode $description Description for field input (null: {!ORDER})
* @param ?integer $num_automated_now The number of records that are currently automated (null: work out)
* @return Tempcode Ordering field
*/
function get_order_field(string $entry_type, ?string $category_type, ?int $current_order, ?int $max = null, ?int $total = null, string $order_field = 'order', ?object $description = null, ?int $num_automated_now = null) : object
