*/
protected $serialize;
+ /**
+ * @var string
+ */
+ protected $helpPre;
+
+ /**
+ * @var string
+ */
+ protected $helpPost;
+
/**
* Aliases for the valid data types
*
return $this;
}
+ /**
+ * @return string|NULL
+ */
+ public function getHelpPre() {
+ return $this->helpPre;
+ }
+
+ /**
+ * @param string|NULL $helpPre
+ */
+ public function setHelpPre($helpPre) {
+ $this->helpPre = is_string($helpPre) && strlen($helpPre) ? $helpPre : NULL;
+ }
+
+ /**
+ * @return string|NULL
+ */
+ public function getHelpPost() {
+ return $this->helpPost;
+ }
+
+ /**
+ * @param string|NULL $helpPost
+ */
+ public function setHelpPost($helpPost) {
+ $this->helpPost = is_string($helpPost) && strlen($helpPost) ? $helpPost : NULL;
+ }
+
/**
* Add valid types that are not not part of \CRM_Utils_Type::dataTypes
*
$field->setCustomFieldId(ArrayHelper::value('id', $data));
$field->setCustomGroupName($data['custom_group.name']);
$field->setTitle(ArrayHelper::value('label', $data));
+ $field->setHelpPre(ArrayHelper::value('help_pre', $data));
+ $field->setHelpPost(ArrayHelper::value('help_post', $data));
$field->setOptions(self::customFieldHasOptions($data));
if (\CRM_Core_BAO_CustomField::isSerialized($data)) {
$field->setSerialize(\CRM_Core_DAO::SERIALIZE_SEPARATOR_BOOKEND);
$customFields = CustomField::get()
->setCheckPermissions(FALSE)
->addWhere('custom_group.extends', 'IN', $extends)
- ->setSelect(['custom_group.name', 'custom_group_id', 'name', 'label', 'data_type', 'html_type', 'is_searchable', 'is_search_range', 'weight', 'is_active', 'is_view', 'option_group_id', 'default_value', 'date_format', 'time_format', 'start_date_years', 'end_date_years'])
+ ->setSelect(['custom_group.name', 'custom_group_id', 'name', 'label', 'data_type', 'html_type', 'is_searchable', 'is_search_range', 'weight', 'is_active', 'is_view', 'option_group_id', 'default_value', 'date_format', 'time_format', 'start_date_years', 'end_date_years', 'help_pre', 'help_post'])
->execute();
foreach ($customFields as $fieldArray) {
private function getCustomGroupFields($customGroup, RequestSpec $specification) {
$customFields = CustomField::get()
->addWhere('custom_group.name', '=', $customGroup)
- ->setSelect(['custom_group.name', 'custom_group_id', 'name', 'label', 'data_type', 'html_type', 'is_searchable', 'is_search_range', 'weight', 'is_active', 'is_view', 'option_group_id', 'default_value', 'custom_group.table_name', 'column_name', 'date_format', 'time_format', 'start_date_years', 'end_date_years'])
+ ->setSelect(['custom_group.name', 'custom_group_id', 'name', 'label', 'data_type', 'html_type', 'is_searchable', 'is_search_range', 'weight', 'is_active', 'is_view', 'option_group_id', 'default_value', 'custom_group.table_name', 'column_name', 'date_format', 'time_format', 'start_date_years', 'end_date_years', 'help_pre', 'help_post'])
->execute();
foreach ($customFields as $fieldArray) {