3 require_once 'afform_html.civix.php';
4 use CRM_AfformHtml_ExtensionUtil
as E
;
6 if (!defined('AFFORM_HTML_MONACO')) {
7 define('AFFORM_HTML_MONACO', 'bower_components/monaco-editor/min/vs');
11 * Implements hook_civicrm_config().
13 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
15 function afform_html_civicrm_config(&$config) {
16 _afform_html_civix_civicrm_config($config);
20 * Implements hook_civicrm_xmlMenu().
22 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_xmlMenu
24 function afform_html_civicrm_xmlMenu(&$files) {
25 _afform_html_civix_civicrm_xmlMenu($files);
29 * Implements hook_civicrm_install().
31 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_install
33 function afform_html_civicrm_install() {
34 _afform_html_civix_civicrm_install();
38 * Implements hook_civicrm_postInstall().
40 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_postInstall
42 function afform_html_civicrm_postInstall() {
43 _afform_html_civix_civicrm_postInstall();
47 * Implements hook_civicrm_uninstall().
49 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_uninstall
51 function afform_html_civicrm_uninstall() {
52 _afform_html_civix_civicrm_uninstall();
56 * Implements hook_civicrm_enable().
58 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_enable
60 function afform_html_civicrm_enable() {
61 _afform_html_civix_civicrm_enable();
65 * Implements hook_civicrm_disable().
67 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_disable
69 function afform_html_civicrm_disable() {
70 _afform_html_civix_civicrm_disable();
74 * Implements hook_civicrm_upgrade().
76 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_upgrade
78 function afform_html_civicrm_upgrade($op, CRM_Queue_Queue
$queue = NULL) {
79 return _afform_html_civix_civicrm_upgrade($op, $queue);
83 * Implements hook_civicrm_managed().
85 * Generate a list of entities to create/deactivate/delete when this module
86 * is installed, disabled, uninstalled.
88 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_managed
90 function afform_html_civicrm_managed(&$entities) {
91 _afform_html_civix_civicrm_managed($entities);
95 * Implements hook_civicrm_caseTypes().
97 * Generate a list of case-types.
99 * Note: This hook only runs in CiviCRM 4.4+.
101 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_caseTypes
103 function afform_html_civicrm_caseTypes(&$caseTypes) {
104 _afform_html_civix_civicrm_caseTypes($caseTypes);
108 * Implements hook_civicrm_angularModules().
110 * Generate a list of Angular modules.
112 * Note: This hook only runs in CiviCRM 4.5+. It may
113 * use features only available in v4.6+.
115 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_angularModules
117 function afform_html_civicrm_angularModules(&$angularModules) {
118 _afform_html_civix_civicrm_angularModules($angularModules);
122 * Implements hook_civicrm_alterSettingsFolders().
124 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_alterSettingsFolders
126 function afform_html_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) {
127 _afform_html_civix_civicrm_alterSettingsFolders($metaDataFolders);
131 * Implements hook_civicrm_entityTypes().
133 * Declare entity types provided by this module.
135 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_entityTypes
137 function afform_html_civicrm_entityTypes(&$entityTypes) {
138 _afform_html_civix_civicrm_entityTypes($entityTypes);
142 * Implements hook_civicrm_themes().
144 function afform_html_civicrm_themes(&$themes) {
145 _afform_html_civix_civicrm_themes($themes);
149 * Implements hook_civicrm_check().
151 function afform_html_civicrm_check(&$messages) {
152 $dir = E
::path(AFFORM_HTML_MONACO
);
153 if (!file_exists($dir)) {
154 $messages[] = new CRM_Utils_Check_Message(
155 'afform_html_monaco',
156 ts('Afform HTML is missing its "bower_components" folder. Please consult the README.md for current installation instructions.'),
157 ts('Afform HTML: Packages are missing'),
158 \Psr\Log\LogLevel
::CRITICAL
,