Function __global->add_aggregate_type_instance
Definitions
sources/aggregate_types.php
- Add an aggregate type instance.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$aggregate_label | SHORT_TEXT | No | No | required parameter | N/A | N/A | Label for new instance |
$aggregate_type | ID_TEXT | No | No | required parameter | N/A | N/A | What the instance is of |
$_other_parameters | array | No | No | required parameter | N/A | N/A | Additional parameters |
$add_time | ?TIME | No | No | Null | N/A | N/A | Add time (null: now) |
$edit_time | ?TIME | No | No | Null | N/A | N/A | Edit time (null: not edited yet) |
$sync | boolean | No | No | True | N/A | N/A | Whether to activate it |
$uniqify | boolean | No | No | False | N/A | N/A | Whether to force the name as unique, if there's a conflict |
Returns
- ID of the new instance
- Type: AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Add an aggregate type instance.
*
* @param SHORT_TEXT $aggregate_label Label for new instance
* @param ID_TEXT $aggregate_type What the instance is of
* @param array $_other_parameters Additional parameters
* @param ?TIME $add_time Add time (null: now)
* @param ?TIME $edit_time Edit time (null: not edited yet)
* @param boolean $sync Whether to activate it
* @param boolean $uniqify Whether to force the name as unique, if there's a conflict
* @return AUTO_LINK ID of the new instance
*/
function add_aggregate_type_instance(string $aggregate_label, string $aggregate_type, array $_other_parameters, ?int $add_time = null, ?int $edit_time = null, bool $sync = true, bool $uniqify = false) : int
* Add an aggregate type instance.
*
* @param SHORT_TEXT $aggregate_label Label for new instance
* @param ID_TEXT $aggregate_type What the instance is of
* @param array $_other_parameters Additional parameters
* @param ?TIME $add_time Add time (null: now)
* @param ?TIME $edit_time Edit time (null: not edited yet)
* @param boolean $sync Whether to activate it
* @param boolean $uniqify Whether to force the name as unique, if there's a conflict
* @return AUTO_LINK ID of the new instance
*/
function add_aggregate_type_instance(string $aggregate_label, string $aggregate_type, array $_other_parameters, ?int $add_time = null, ?int $edit_time = null, bool $sync = true, bool $uniqify = false) : int