Function Resource_fs_base->convert_label_to_filename
Definitions
sources/resource_fs_base_class.php
- Convert a label to a filename, possibly with auto-creating if needed. This is useful for the software-side resource-agnostic API.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: string
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$label | LONG_TEXT | required parameter | N/A | N/A | Resource label |
$subpath | string | required parameter | N/A | N/A | The path (blank: root / not applicable). It may end in "/*" if you want to look for a match under a certain directory |
$resource_type | ID_TEXT | required parameter | N/A | N/A | Resource type |
$must_already_exist | boolean | False | N/A | N/A | Whether the content must already exist |
$use_guid_for_new | ?ID_TEXT | Null | N/A | N/A | GUID to auto-create with (null: either not auto-creating, or not specifying the GUID if we are) |
Return
- The filename (null: not found)
- Type: ?ID_TEXT
- Set: N/A
- Range: N/A