+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
*/
class CRM_Utils_Type {
const
T_CCNUM = 8192,
T_MEDIUMBLOB = 16384;
- // @todo What's the point of these constants? Backwards compatibility?
+ // @TODO What's the point of these constants? Backwards compatibility?
+ //
+ // These are used for field size (<input type=text size=2>), but redundant TWO=2
+ // usages are rare and should be eliminated. See CRM-18810.
const
TWO = 2,
FOUR = 4,
return $output;
}
+ /**
+ * Get list of avaliable Data Tupes for Option Groups
+ *
+ * @return array
+ */
+ public static function dataTypes() {
+ $types = array(
+ 'Integer',
+ 'String',
+ 'Date',
+ 'Time',
+ 'Timestamp',
+ 'Money',
+ 'Email',
+ );
+ return array_combine($types, $types);
+ }
+
}