Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CRM/Wci/Upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* Collection of upgrade steps
*/
class CRM_Wci_Upgrader extends CRM_Wci_Upgrader_Base {
class CRM_Wci_Upgrader extends CRM_Extension_Upgrader_Base {

// By convention, functions that look like "function upgrade_NNNN()" are
// upgrade tasks. They are executed in order (like Drupal's hook_update_N).
Expand Down
320 changes: 0 additions & 320 deletions CRM/Wci/Upgrader/Base.php

This file was deleted.

13 changes: 12 additions & 1 deletion info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,24 @@
<version>1.0-rc4</version>
<develStage>beta</develStage>
<compatibility>
<ver>4.4</ver>
<ver>5.38</ver>
</compatibility>
<comments>Contributed by Zyxware Technologies - www.zyxware.com</comments>
<civix>
<namespace>CRM/Wci</namespace>
<format>23.02.1</format>
</civix>
<urls>
<url desc="Documentation">https://github.com/zyxware/civiwci/wiki</url>
</urls>
<mixins>
<mixin>menu-xml@1.0.0</mixin>
<mixin>setting-php@1.0.0</mixin>
<mixin>smarty-v2@1.0.1</mixin>
</mixins>
<classloader>
<psr0 prefix="CRM_" path="."/>
<psr4 prefix="Civi\" path="Civi"/>
</classloader>
<upgrader>CRM_Wci_Upgrader</upgrader>
</extension>
31 changes: 31 additions & 0 deletions mixin/menu-xml@1.0.0.mixin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

/**
* Auto-register "xml/Menu/*.xml" files.
*
* @mixinName menu-xml
* @mixinVersion 1.0.0
*
* @param CRM_Extension_MixInfo $mixInfo
* On newer deployments, this will be an instance of MixInfo. On older deployments, Civix may polyfill with a work-a-like.
* @param \CRM_Extension_BootCache $bootCache
* On newer deployments, this will be an instance of MixInfo. On older deployments, Civix may polyfill with a work-a-like.
*/
return function ($mixInfo, $bootCache) {

/**
* @param \Civi\Core\Event\GenericHookEvent $e
* @see CRM_Utils_Hook::xmlMenu()
*/
Civi::dispatcher()->addListener('hook_civicrm_xmlMenu', function ($e) use ($mixInfo) {
if (!$mixInfo->isActive()) {
return;
}

$files = (array) glob($mixInfo->getPath('xml/Menu/*.xml'));
foreach ($files as $file) {
$e->files[] = $file;
}
});

};
Loading