Skip to content

Commit

Permalink
Merge pull request #40
Browse files Browse the repository at this point in the history
Automated pull request - civix regenerated
  • Loading branch information
agileware-fj committed Aug 9, 2023
2 parents 83afe12 + 25d811e commit 6298c17
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
15 changes: 2 additions & 13 deletions eWAYRecurring.civix.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ function _eWAYRecurring_civix_insert_navigation_menu(&$menu, $path, $item) {
if (empty($path)) {
$menu[] = [
'attributes' => array_merge([
'label' => CRM_Utils_Array::value('name', $item),
'active' => 1,
'label' => $item['name'] ?? NULL,
'active' => 1,
], $item),
];
return TRUE;
Expand Down Expand Up @@ -205,14 +205,3 @@ function _eWAYRecurring_civix_fixNavigationMenuItems(&$nodes, &$maxNavID, $paren
}
}
}

/**
* (Delegated) Implements hook_civicrm_entityTypes().
*
* Find any *.entityType.php files, merge their content, and return.
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes
*/
function _eWAYRecurring_civix_civicrm_entityTypes(&$entityTypes) {
$entityTypes = array_merge($entityTypes, []);
}
5 changes: 3 additions & 2 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@
<comments/>
<civix>
<namespace>CRM/eWAYRecurring</namespace>
<format>23.01.0</format>
<format>23.02.1</format>
</civix>
<mixins>
<mixin>menu-xml@1.0.0</mixin>
<mixin>setting-php@1.0.0</mixin>
<mixin>smarty-v2@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_eWAYRecurring_Upgrader</upgrader>
</extension>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Auto-register "templates/" folder.
*
* @mixinName smarty-v2
* @mixinVersion 1.0.0
* @mixinVersion 1.0.1
* @since 5.59
*
* @param CRM_Extension_MixInfo $mixInfo
Expand All @@ -19,14 +19,9 @@
}

$register = function() use ($dir) {
// This implementation is useful for older versions of CiviCRM. It can be replaced/updated going forward (v1.1+).
$smarty = CRM_Core_Smarty::singleton();
if (!is_array($smarty->template_dir)) {
$this->template_dir = [$smarty->template_dir];
}
if (!in_array($dir, $smarty->template_dir)) {
array_unshift($smarty->template_dir, $dir);
}
// This implementation has a theoretical edge-case bug on older versions of CiviCRM where a template could
// be registered more than once.
CRM_Core_Smarty::singleton()->addTemplateDir($dir);
};

// Let's figure out what environment we're in -- so that we know the best way to call $register().
Expand Down

0 comments on commit 6298c17

Please sign in to comment.