remove static CustomField array
This commit is contained in:
parent
8ee0079b37
commit
b3b24681e5
2 changed files with 4 additions and 18 deletions
|
@ -66,18 +66,14 @@ class CRM_TwingleCampaign_Upgrader extends CRM_TwingleCampaign_Upgrader_Base {
|
||||||
$custom_group['extends_entity_column_value'] = $campaign_type->getValue();
|
$custom_group['extends_entity_column_value'] = $campaign_type->getValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
new Models\CustomGroup($custom_group);
|
$cg = new Models\CustomGroup($custom_group);
|
||||||
}
|
$cg->create();
|
||||||
foreach (Models\CustomGroup::getCustomGroups() as $custom_group) {
|
|
||||||
$custom_group->create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create custom fields
|
// Create custom fields
|
||||||
foreach ($campaign_info['custom_fields'] as $custom_field) {
|
foreach ($campaign_info['custom_fields'] as $custom_field) {
|
||||||
new Models\CustomField($custom_field);
|
$cf = new Models\CustomField($custom_field);
|
||||||
}
|
$cf->create();
|
||||||
foreach (Models\CustomField::getCustomFields() as $custom_field) {
|
|
||||||
$custom_field->create();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ use CRM_TwingleCampaign_ExtensionUtil as E;
|
||||||
|
|
||||||
class CustomField {
|
class CustomField {
|
||||||
|
|
||||||
private static $customFields = [];
|
|
||||||
private $id;
|
private $id;
|
||||||
private $custom_group_id;
|
private $custom_group_id;
|
||||||
private $label;
|
private $label;
|
||||||
|
@ -39,8 +38,6 @@ class CustomField {
|
||||||
$this->help_post = E::ts($this->help_post);
|
$this->help_post = E::ts($this->help_post);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
array_push(self::$customFields, $this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -312,13 +309,6 @@ class CustomField {
|
||||||
$this->default_value = $default_value;
|
$this->default_value = $default_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public static function getCustomFields(): array {
|
|
||||||
return self::$customFields;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue