Function Resource_fs_base->_has_parent_child_relationship
Definitions
sources/resource_fs_base_class.php
- Find whether a kind of resource handled by this hook (folder or file) can be under a particular kind of folder.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $above | ?ID_TEXT | No | No | required parameter | N/A | N/A | Folder resource type (null: root) |
| $under | ID_TEXT | No | No | required parameter | N/A | N/A | Resource type (may be file or folder) |
Returns
- A map: The parent referencing field, the table it is in, and the ID field of that table (null: cannot be under)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find whether a kind of resource handled by this hook (folder or file) can be under a particular kind of folder.
*
* @param ?ID_TEXT $above Folder resource type (null: root)
* @param ID_TEXT $under Resource type (may be file or folder)
* @return ?array A map: The parent referencing field, the table it is in, and the ID field of that table (null: cannot be under)
*/
protected function _has_parent_child_relationship(?string $above, string $under) : ?array
* Find whether a kind of resource handled by this hook (folder or file) can be under a particular kind of folder.
*
* @param ?ID_TEXT $above Folder resource type (null: root)
* @param ID_TEXT $under Resource type (may be file or folder)
* @return ?array A map: The parent referencing field, the table it is in, and the ID field of that table (null: cannot be under)
*/
protected function _has_parent_child_relationship(?string $above, string $under) : ?array

