No Code Attached Yet
avatar robbiejackson
robbiejackson
20 Jul 2023

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.

avatar robbiejackson robbiejackson - open - 20 Jul 2023
avatar robbiejackson robbiejackson - change - 20 Jul 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jul 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Jul 2023
avatar richard67
richard67 - comment - 20 Jul 2023

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?

avatar robbiejackson
robbiejackson - comment - 21 Jul 2023

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41197.

avatar brianteeman
brianteeman - comment - 21 Jul 2023

Probably for the same reason I discovered and started to fix regarding fqn

avatar richard67 richard67 - change - 21 Jul 2023
Title
CategoryNode::getParent() is missing
CategoryNode::getParent() is missing on API documentation
avatar richard67 richard67 - edited - 21 Jul 2023
avatar richard67 richard67 - change - 21 Jul 2023
Title
CategoryNode::getParent() is missing on API documentation
CategoryNode::getParent() is missing in API documentation
avatar richard67 richard67 - edited - 21 Jul 2023
avatar richard67
richard67 - comment - 21 Jul 2023

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?

avatar Hackwar Hackwar - close - 26 Jul 2023
avatar Hackwar
Hackwar - comment - 26 Jul 2023

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.

avatar Hackwar Hackwar - change - 26 Jul 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-07-26 19:25:52
Closed_By Hackwar

Add a Comment

Login with GitHub to post a comment