Set version to 5.20.beta1
[civicrm-core.git] / CRM / Extension / Manager / Interface.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
fee14197 4 | CiviCRM version 5 |
6a488035 5 +--------------------------------------------------------------------+
6b83d5bd 6 | Copyright CiviCRM LLC (c) 2004-2019 |
6a488035
TO
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
d25dd0ee 26 */
6a488035
TO
27
28/**
29 * The extension manager handles installing, disabling enabling, and
30 * uninstalling extensions.
31 *
32 * @package CRM
6b83d5bd 33 * @copyright CiviCRM LLC (c) 2004-2019
6a488035
TO
34 */
35interface CRM_Extension_Manager_Interface {
7b966967 36
2d7fd075
TO
37 /**
38 * Perform type-specific installation logic (before marking the
39 * extension as installed or clearing the caches).
40 *
41 * @param CRM_Extension_Info $info
42 */
6a488035 43 public function onPreInstall(CRM_Extension_Info $info);
2d7fd075
TO
44
45 /**
46 * Perform type-specific installation logic (after marking the
47 * extension as installed but before clearing the caches).
48 *
49 * @param CRM_Extension_Info $info
50 */
6a488035
TO
51 public function onPostInstall(CRM_Extension_Info $info);
52
2d7fd075
TO
53 /**
54 * Perform type-specific installation logic (after marking the
55 * extension as installed and clearing the caches).
56 *
57 * @param CRM_Extension_Info $info
58 */
59 public function onPostPostInstall(CRM_Extension_Info $info);
60
e0ef6999
EM
61 /**
62 * @param CRM_Extension_Info $info
e0ef6999 63 */
6a488035 64 public function onPreEnable(CRM_Extension_Info $info);
e0ef6999
EM
65
66 /**
67 * @param CRM_Extension_Info $info
e0ef6999 68 */
6a488035
TO
69 public function onPostEnable(CRM_Extension_Info $info);
70
71 /**
72 * Perform type-specific removal logic (before updating the extension
73 * row in the "civicrm_extension" table).
03e04002 74 *
f41911fd
TO
75 * @param CRM_Extension_Info $info
76 * May be generated from xml or DB (which is lossy).
6a488035
TO
77 * @see CRM_Extension_Manager::createInfoFromDB
78 */
79 public function onPreDisable(CRM_Extension_Info $info);
80
81 /**
82 * Perform type-specific removal logic (after updating the extension
83 * row in the "civicrm_extension" table).
84 *
f41911fd
TO
85 * @param CRM_Extension_Info $info
86 * May be generated from xml or DB (which is lossy).
6a488035
TO
87 * @see CRM_Extension_Manager::createInfoFromDB
88 */
89 public function onPostDisable(CRM_Extension_Info $info);
90
91 /**
92 * Perform type-specific removal logic (before removing the extension
93 * row in the "civicrm_extension" table).
94 *
f41911fd
TO
95 * @param CRM_Extension_Info $info
96 * May be generated from xml or DB (which is lossy).
6a488035
TO
97 * @see CRM_Extension_Manager::createInfoFromDB
98 */
99 public function onPreUninstall(CRM_Extension_Info $info);
100
101 /**
102 * Perform type-specific removal logic (after removing the extension
103 * row in the "civicrm_extension" table).
104 *
f41911fd
TO
105 * @param CRM_Extension_Info $info
106 * May be generated from xml or DB (which is lossy).
6a488035
TO
107 * @see CRM_Extension_Manager::createInfoFromDB
108 */
109 public function onPostUninstall(CRM_Extension_Info $info);
110
e0ef6999
EM
111 /**
112 * @param CRM_Extension_Info $oldInfo
113 * @param CRM_Extension_Info $newInfo
e0ef6999 114 */
6a488035 115 public function onPreReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo);
e0ef6999
EM
116
117 /**
118 * @param CRM_Extension_Info $oldInfo
119 * @param CRM_Extension_Info $newInfo
95ea96be
EM
120 */
121 public function onPostReplace(CRM_Extension_Info $oldInfo, CRM_Extension_Info $newInfo);
96025800 122
6a488035 123}