PluginProbe
The Innovative Form Builder – IvyForms / 1.0
The Innovative Form Builder – IvyForms v1.0
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Services / InstallActions / ActivationDatabaseHook.php

ActivationDatabaseHook.php in The Innovative Form Builder – IvyForms 1.0, at backend/src/Services/InstallActions/ActivationDatabaseHook.php

50 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Database hook for activation
5 */
6
7 namespace IvyForms\Services\InstallActions;
8
9 use IvyForms\Common\Exceptions\InvalidArgumentException;
10 use IvyForms\Services\InstallActions\DB\Confirmation\ConfirmationsTable;
11 use IvyForms\Services\InstallActions\DB\Entry\EntriesTable;
12 use IvyForms\Services\InstallActions\DB\EntryField\EntryFieldsTable;
13 use IvyForms\Services\InstallActions\DB\Field\FieldsTable;
14 use IvyForms\Services\InstallActions\DB\Form\FormsTable;
15 use IvyForms\Services\InstallActions\DB\Notification\NotificationsTable;
16 use IvyForms\Services\InstallActions\DB\FieldOptions\FieldOptionsTable;
17 use IvyForms\Services\InstallActions\Migrations\AddRowColumnLayoutToFields;
18 use IvyForms\Services\InstallActions\Migrations\SeedRowIndexForFields;
19 use IvyForms\Services\InstallActions\Migrations\AddReplyToToNotifications;
20 use IvyForms\Services\InstallActions\Migrations\AddShowEmptyFieldsToNotifications;
21
22 /**
23 * Class ActivationHook
24 *
25 * @package IvyForms\Services\InstallActions
26 */
27 class ActivationDatabaseHook
28 {
29 /**
30 * Initialize the plugin
31 * @throws InvalidArgumentException
32 */
33 public static function init(): void
34 {
35 FormsTable::init();
36 FieldsTable::init();
37 NotificationsTable::init();
38 ConfirmationsTable::init();
39 EntriesTable::init();
40 EntryFieldsTable::init();
41 FieldOptionsTable::init();
42
43 // Run migrations
44 AddRowColumnLayoutToFields::run();
45 SeedRowIndexForFields::run();
46 AddReplyToToNotifications::run();
47 AddShowEmptyFieldsToNotifications::run();
48 }
49 }
50