The function getParent
is not present for CategoryNode in Joomla 4. The function is present in Joomla 3 CategoryNode API, but as it's not marked as deprecated there I assume that it's omitted by accident.
Maybe it got missed when a number of CategoryNode functions were extracted into NodeTrait.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Yes I wrote some code and confirmed that the function is still there and accessible. So it's just the API DOCs which are missing it for some reason.
Probably for the same reason I discovered and started to fix regarding fqn
Title |
|
Title |
|
Or the documentation tool has problems to resolve it when a method is inside a trait which is used by another trait which then is used in the class?
The documentation has been updated and fixed and now this should be fine. I'm closing this issue, but if you still have this problem, please post here again and I will open the issue back up again.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-07-26 19:25:52 |
Closed_By | ⇒ | Hackwar |
Hmm, NodeTrait uses the ImmutableNodeTrait: https://github.com/joomla/joomla-cms/blob/4.3-dev/libraries/src/Tree/NodeTrait.php#L23
And this has the getParent function: https://github.com/joomla/joomla-cms/blob/4.3-dev/libraries/src/Tree/ImmutableNodeTrait.php#L87
So maybe it’s just the API docs missing it?