Function __global->suggest_new_idmoniker_for
Definitions
sources/urls2.php
- Called when content is added, or edited/moved, based upon a new form field that specifies what moniker to use.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $page | ID_TEXT | No | No | required parameter | N/A | N/A | Page name |
| $type | ID_TEXT | No | No | required parameter | N/A | N/A | Screen type code |
| $id | ID_TEXT | No | No | required parameter | N/A | N/A | Resource ID |
| $zone | ID_TEXT | No | No | required parameter | N/A | N/A | The URL zone name (only used for Comcode Page URL monikers) |
| $moniker_src | string | No | No | required parameter | N/A | N/A | String from which a moniker will be chosen (may not be blank) |
| $is_new | boolean | No | No | False | N/A | N/A | Whether we are sure this is a new moniker (makes things more efficient, saves a query) |
| $moniker | ?string | No | No | Null | N/A | N/A | Actual moniker to use (null: generate from $moniker_src). Usually this is left null. |
Returns
- The chosen moniker
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Called when content is added, or edited/moved, based upon a new form field that specifies what moniker to use.
*
* @param ID_TEXT $page Page name
* @param ID_TEXT $type Screen type code
* @param ID_TEXT $id Resource ID
* @param ID_TEXT $zone The URL zone name (only used for Comcode Page URL monikers)
* @param string $moniker_src String from which a moniker will be chosen (may not be blank)
* @param boolean $is_new Whether we are sure this is a new moniker (makes things more efficient, saves a query)
* @param ?string $moniker Actual moniker to use (null: generate from $moniker_src). Usually this is left null.
* @return string The chosen moniker
*/
function suggest_new_idmoniker_for(string $page, string $type, string $id, string $zone, string $moniker_src, bool $is_new = false, ?string $moniker = null) : string
* Called when content is added, or edited/moved, based upon a new form field that specifies what moniker to use.
*
* @param ID_TEXT $page Page name
* @param ID_TEXT $type Screen type code
* @param ID_TEXT $id Resource ID
* @param ID_TEXT $zone The URL zone name (only used for Comcode Page URL monikers)
* @param string $moniker_src String from which a moniker will be chosen (may not be blank)
* @param boolean $is_new Whether we are sure this is a new moniker (makes things more efficient, saves a query)
* @param ?string $moniker Actual moniker to use (null: generate from $moniker_src). Usually this is left null.
* @return string The chosen moniker
*/
function suggest_new_idmoniker_for(string $page, string $type, string $id, string $zone, string $moniker_src, bool $is_new = false, ?string $moniker = null) : string

