Function Module_admin_custom_comcode->get_form_fields
Definitions
adminzone/pages/modules/admin_custom_comcode.php
- Get Tempcode for a Custom Comcode tag adding/editing form.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $title | SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | The title (name) of the Custom Comcode tag |
| $description | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | The description of the tag |
| $enabled | BINARY | No | No | 1 | N/A | N/A | Whether the tag is enabled |
| $tag | ID_TEXT | No | No | this | N/A | N/A | The actual tag code |
| $replace | LONG_TEXT | No | No | <span class="example" style="color: {color}">{content}</span> | N/A | N/A | What to replace the tag with |
| $example | LONG_TEXT | No | No | [this color="red"]blah[/this] | N/A | N/A | Example usage |
| $parameters | SHORT_TEXT | No | No | color=black | N/A | N/A | Comma-separated list of accepted parameters |
| $dangerous_tag | BINARY | No | No | 0 | N/A | N/A | Whether it is a dangerous tag |
| $block_tag | BINARY | No | No | 0 | N/A | N/A | Whether it is a block tag |
| $textual_tag | BINARY | No | No | 1 | N/A | N/A | Whether it is a textual tag |
Returns
- A pair: The input fields, Hidden fields
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get Tempcode for a Custom Comcode tag adding/editing form.
*
* @param SHORT_TEXT $title The title (name) of the Custom Comcode tag
* @param LONG_TEXT $description The description of the tag
* @param BINARY $enabled Whether the tag is enabled
* @param ID_TEXT $tag The actual tag code
* @param LONG_TEXT $replace What to replace the tag with
* @param LONG_TEXT $example Example usage
* @param SHORT_TEXT $parameters Comma-separated list of accepted parameters
* @param BINARY $dangerous_tag Whether it is a dangerous tag
* @param BINARY $block_tag Whether it is a block tag
* @param BINARY $textual_tag Whether it is a textual tag
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(string $title = '', string $description = '', int $enabled = 1, string $tag = 'this', string $replace = '<span class="example" style="color: {color}">{content}</span>', string $example = '[this color="red"]blah[/this]', string $parameters = 'color=black', int $dangerous_tag = 0, int $block_tag = 0, int $textual_tag = 1) : array
* Get Tempcode for a Custom Comcode tag adding/editing form.
*
* @param SHORT_TEXT $title The title (name) of the Custom Comcode tag
* @param LONG_TEXT $description The description of the tag
* @param BINARY $enabled Whether the tag is enabled
* @param ID_TEXT $tag The actual tag code
* @param LONG_TEXT $replace What to replace the tag with
* @param LONG_TEXT $example Example usage
* @param SHORT_TEXT $parameters Comma-separated list of accepted parameters
* @param BINARY $dangerous_tag Whether it is a dangerous tag
* @param BINARY $block_tag Whether it is a block tag
* @param BINARY $textual_tag Whether it is a textual tag
* @return array A pair: The input fields, Hidden fields
*/
public function get_form_fields(string $title = '', string $description = '', int $enabled = 1, string $tag = 'this', string $replace = '<span class="example" style="color: {color}">{content}</span>', string $example = '[this color="red"]blah[/this]', string $parameters = 'color=black', int $dangerous_tag = 0, int $block_tag = 0, int $textual_tag = 1) : array

