0

The Joomla! MVC development docs for writing an intall script gives an example com_helloWorldInstallerScript. That class has an install() method, with this example:

$parent->getParent()->setRedirectURL('index.php?option=com_helloworld');

Where is the getParent() method coming from? Can anyone point me to documentation for it? The docblock in the example installer class says "This class will be called by Joomla!'s installer", but the getParent() method is not on Installer, JAdapter (extended by Installer), or CMSObject (not sure if docs are out-of-date, as JAdapter says it extends JObject, or if that dependency is removed).

0

JAdapterInstance. In 4.0 it's moved to InstallerAdapter.

  • Thanks, Sharky. Too bad the API documentation doesn't show interfaces implemented, next time I'll dig into the source. I'd upvote you but don't have enough points to do so :) Any idea why they designed the API this way (i.e. with a getParent() method on the interface)? I'm curious what the design process was, to improve (or know what to avoid) in my own API design efforts. – calligraphic-io Jul 27 '18 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.