X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FCodeGen%2FSpecification.php;h=faaaacce7deb337439c250f85a3487dbed6bcd05;hb=65c86f7db8c97577fcb3a8c9d2a59f6d1e4ad881;hp=5d06369437a77e09d017cbd3e143d86673844206;hpb=e4636fa7912cc7a53ceaf61d4d0edb868a998f54;p=civicrm-core.git diff --git a/CRM/Core/CodeGen/Specification.php b/CRM/Core/CodeGen/Specification.php index 5d06369437..faaaacce7d 100644 --- a/CRM/Core/CodeGen/Specification.php +++ b/CRM/Core/CodeGen/Specification.php @@ -336,12 +336,13 @@ class CRM_Core_CodeGen_Specification { break; default: - $field['sqlType'] = $field['phpType'] = $type; + $field['phpType'] = $this->value('phpType', $fieldXML, $type); + $field['sqlType'] = $type; if ($type == 'int unsigned') { $field['crmType'] = 'CRM_Utils_Type::T_INT'; } else { - $field['crmType'] = 'CRM_Utils_Type::T_' . strtoupper($type); + $field['crmType'] = $this->value('crmType', $fieldXML, 'CRM_Utils_Type::T_' . strtoupper($type)); } break; } @@ -371,6 +372,7 @@ class CRM_Core_CodeGen_Specification { $validOptions = array( 'type', 'formatType', + 'label', /* Fixme: prior to CRM-13497 these were in a flat structure // CRM-13497 moved them to be nested within 'html' but there's no point // making that change in the DAOs right now since we are in the process of @@ -401,7 +403,9 @@ class CRM_Core_CodeGen_Specification { $field['widget']['required'] = $this->value('required', $fieldXML); } } - + if (isset($fieldXML->localize_context)) { + $field['localize_context'] = $fieldXML->localize_context; + } $field['pseudoconstant'] = $this->value('pseudoconstant', $fieldXML); if (!empty($field['pseudoconstant'])) { //ok this is a bit long-winded but it gets there & is consistent with above approach