public function preflight(string $type, InstallerAdapter $adapter): bool;The problem is the ordering of actions. I am creating new tables and modifying existing ones using the MySQL update feature of the installer (via a version-named sql file in the update directory).
So I want to know if this update is done before the install postflight is run. If so, I can do the PHP stuff to populate the new tables there. If it is done after that, I cannot.
Runs before the component is installed, updated or uninstalled.
This is where you make basic environment checks and make sure that the installer can proceed. Return boolean false to stop the installer, causing to display an error like “Extension something: Custom install routine failure.”
public function update(InstallerAdapter $adapter): bool;
Runs after your extension has been updated. It merely means that a different version than the one which was previously installed on the site has been installed. It might be the same version (refresh) or even an earlier version (downgrade).
public function postflight(string $type, InstallerAdapter $adapter): bool;
This runs at the very last end, before Joomla cleans up. It runs after the extension has been installed, updated or uninstalled.
Statistics: Posted by carlitorweb — Fri May 03, 2024 5:21 pm