December 2015
Intermediate to advanced
412 pages
8h 14m
English
InstallSchema, or install script, is a way for us to set up tables in the database that will be used to persist our models later on.
If we look back at the module requirements, the following fields need to be created in the foggyline_helpdesk_ticket table:
ticket_idcustomer_idtitleseveritycreated_atstatusOur InstallSchema is defined under the app/code/Foggyline/Helpdesk/Setup/InstallSchema.php file with (partial) content as follows:
<?php namespace Foggyline\Helpdesk\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; /** * @codeCoverageIgnore */ class InstallSchema implements InstallSchemaInterface ...
Read now
Unlock full access