The Recurring script

The Recurring scripts executes on each and every setup:upgrade command, regardless of the schema_version or data_version logged against the setup_module table.

Let's create the <MAGELICIOUS_DIR>/Core/Setup/Recurring.php file with the following content:

use MagentoFrameworkSetupInstallSchemaInterface;
use MagentoFrameworkSetupModuleContextInterface;
use MagentoFrameworkSetupSchemaSetupInterface;

class Recurring implements InstallSchemaInterface {
public function install(SchemaSetupInterface $setup, ModuleContextInterface $context) {
$setup->startSetup();
echo 'Recurring->install()' . PHP_EOL;
$setup->endSetup();
}
}

Though interesting, the Recurring scripts are rarely used in Magento. Only a handful of them are used, and that is mostly for installing external foreign keys. This is not to say that we cannot use them for our purposes – it is just that their use case is quite limited when we think about it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.254.94