Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SUD Éducation
Cartable
Commits
1cf1c7ec
Commit
1cf1c7ec
authored
5 months ago
by
FoucherAurelie
Browse files
Options
Download
Email Patches
Plain Diff
#165 update new corps retraite
parent
8715fe2a
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cartable/CRM/Cartable/Upgrader.php
+3
-0
cartable/CRM/Cartable/Upgrader.php
cartable/CRM/Cartable/Upgrader/upgrade_0057.php
+16
-0
cartable/CRM/Cartable/Upgrader/upgrade_0057.php
with
19 additions
and
0 deletions
+19
-0
cartable/CRM/Cartable/Upgrader.php
+
3
-
0
View file @
1cf1c7ec
...
...
@@ -200,6 +200,9 @@ class CRM_Cartable_Upgrader extends CRM_Extension_Upgrader_Base {
public
function
upgrade_0056
()
{
return
$this
->
include_upgrade_version
(
__FUNCTION__
);
}
public
function
upgrade_0057
()
{
return
$this
->
include_upgrade_version
(
__FUNCTION__
);
}
public
function
include_upgrade_version
(
$version
)
{
if
(
file_exists
(
__DIR__
.
"/Upgrader/
{
$version
}
.php"
)){
...
...
This diff is collapsed.
Click to expand it.
cartable/CRM/Cartable/Upgrader/upgrade_0057.php
0 → 100644
+
16
-
0
View file @
1cf1c7ec
<?php
use
CRM_Cartable_ExtensionUtil
as
E
;
$CorpsField_id
=
_cartable_get_option_group_id
(
'Corps'
,
'DonneesParticulier'
);
// Add new options if not existing
$options_new
=
cartable_get_values
(
'corps-retraite'
);
$options_new
=
_cartable_cleanup_existing_values_in_options
(
$options_new
,
$CorpsField_id
);
foreach
(
$options_new
as
$value
=>
$name
)
{
$results
=
\
Civi\Api4\OptionValue
::
create
()
->
addValue
(
'option_group_id'
,
$CorpsField_id
)
->
addValue
(
'value'
,
$value
)
->
addValue
(
'label'
,
$name
)
->
execute
();
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets