Merge pull request #16263 from eileenmcnaughton/ids_3
[civicrm-core.git] / CRM / Extension / Manager / Interface.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * The extension manager handles installing, disabling enabling, and
14 * uninstalling extensions.
15 *
16 * @package CRM
17 * @copyright CiviCRM LLC https://civicrm.org/licensing
18 */
19 interface CRM_Extension_Manager_Interface {
20
21 /**
22 * Perform type-specific installation logic (before marking the
23 * extension as installed or clearing the caches).
24 *
25 * @param CRM_Extension_Info $info
26 */
27 public function onPreInstall(CRM_Extension_Info $info);
28
29 /**
30 * Perform type-specific installation logic (after marking the
31 * extension as installed but before clearing the caches).
32 *
33 * @param CRM_Extension_Info $info
34 */
35 public function onPostInstall(CRM_Extension_Info $info);
36
37 /**
38 * Perform type-specific installation logic (after marking the
39 * extension as installed and clearing the caches).
40 *
41 * @param CRM_Extension_Info $info
42 */
43 public function onPostPostInstall(CRM_Extension_Info $info);
44
45 /**
46 * @param CRM_Extension_Info $info
47 */
48 public function onPreEnable(CRM_Extension_Info $info);
49
50 /**
51 * @param CRM_Extension_Info $info
52 */
53 public function onPostEnable(CRM_Extension_Info $info);
54
55 /**
56 * Perform type-specific removal logic (before updating the extension
57 * row in the "civicrm_extension" table).
58 *
59 * @param CRM_Extension_Info $info
60 * May be generated from xml or DB (which is lossy).
61 * @see CRM_Extension_Manager::createInfoFromDB
62 */
63 public function onPreDisable(CRM_Extension_Info $info);
64
65 /**
66 * Perform type-specific removal logic (after updating the extension
67 * row in the "civicrm_extension" table).
68 *
69 * @param CRM_Extension_Info $info
70 * May be generated from xml or DB (which is lossy).
71 * @see CRM_Extension_Manager::createInfoFromDB
72 */
73 public function onPostDisable(CRM_Extension_Info $info);
74
75 /**
76 * Perform type-specific removal logic (before removing the extension
77 * row in the "civicrm_extension" table).
78 *
79 * @param CRM_Extension_Info $info
80 * May be generated from xml or DB (which is lossy).
81 * @see CRM_Extension_Manager::createInfoFromDB
82 */
83 public function onPreUninstall(CRM_Extension_Info $info);
84
85 /**
86 * Perform type-specific removal logic (after removing the extension
87 * row in the "civicrm_extension" table).
88 *
89 * @param CRM_Extension_Info $info
90 * May be generated from xml or DB (which is lossy).
91 * @see CRM_Extension_Manager::createInfoFromDB
92 */
93 public function onPostUninstall(CRM_Extension_Info $info);
94
95 /**
96 * @param CRM_Extension_Info $oldInfo
97 * @param CRM_Extension_Info $newInfo
98 */
99 public function onPreReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo);
100
101 /**
102 * @param CRM_Extension_Info $oldInfo
103 * @param CRM_Extension_Info $newInfo
104 */
105 public function onPostReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo);
106
107 }