*
* Generated from xml/schema/CRM/Contact/Contact.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:b1dbc34947126531f2fd11aaa30b14a5)
+ * (GenCodeChecksum:395cdbb5eaf3b1f74fb87f93269d8336)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_SEPARATOR_BOOKEND,
'html' => array(
'type' => 'Select',
) ,
'entity' => 'Contact',
'bao' => 'CRM_Contact_BAO_Contact',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_SEPARATOR_BOOKEND,
'html' => array(
'type' => 'Select',
) ,
*
* Generated from xml/schema/CRM/Contact/Group.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4c9dfb678f18129fd9d667de3727dfeb)
+ * (GenCodeChecksum:848664fcd390bd178325b0d991c8e947)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
'where_tables' => array(
'name' => 'where_tables',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
'group_type' => array(
'name' => 'group_type',
'entity' => 'Group',
'bao' => 'CRM_Contact_BAO_Group',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_SEPARATOR_BOOKEND,
'pseudoconstant' => array(
'optionGroupName' => 'group_type',
'optionEditPath' => 'civicrm/admin/options/group_type',
*
* Generated from xml/schema/CRM/Contact/SavedSearch.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:8e799b35db1b6a38deee5a757d4183c0)
+ * (GenCodeChecksum:0341555885ddaf5dbc8e4d6cfe1d899c)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'SavedSearch',
'bao' => 'CRM_Contact_BAO_SavedSearch',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
'mapping_id' => array(
'name' => 'mapping_id',
'entity' => 'SavedSearch',
'bao' => 'CRM_Contact_BAO_SavedSearch',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
'where_tables' => array(
'name' => 'where_tables',
'entity' => 'SavedSearch',
'bao' => 'CRM_Contact_BAO_SavedSearch',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
*
* Generated from xml/schema/CRM/Contribute/ContributionPage.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:00d0eb39eb657241b67e9d5b12bc09d8)
+ * (GenCodeChecksum:2bc7d9380c552fe9995f8403f757cd09)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'ContributionPage',
'bao' => 'CRM_Contribute_BAO_ContributionPage',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'recur_frequency_units',
+ 'keyColumn' => 'name',
+ 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
+ )
) ,
'is_recur_interval' => array(
'name' => 'is_recur_interval',
$field['headerPattern'] = $this->value('headerPattern', $fieldXML);
$field['dataPattern'] = $this->value('dataPattern', $fieldXML);
$field['uniqueName'] = $this->value('uniqueName', $fieldXML);
+ $field['serialize'] = $this->value('serialize', $fieldXML);
$field['html'] = $this->value('html', $fieldXML);
if (!empty($field['html'])) {
$validOptions = array(
BULK_INSERT_COUNT = 200,
BULK_INSERT_HIGH_COUNT = 200,
QUERY_FORMAT_WILDCARD = 1,
- QUERY_FORMAT_NO_QUOTES = 2;
+ QUERY_FORMAT_NO_QUOTES = 2,
+ SERIALIZE_SEPARATOR_BOOKEND = 1,
+ SERIALIZE_SEPARATOR_TRIMMED = 2,
+ SERIALIZE_COMMA = 3,
+ SERIALIZE_JSON = 4,
+ SERIALIZE_PHP = 5;
/**
* Define entities that shouldn't be created or deleted when creating/ deleting
return TRUE;
}
+ /**
+ * Transform an array to a serialized string for database storage.
+ *
+ * @param array|NULL $value
+ * @param $serializationType
+ * @return string|NULL
+ */
+ public static function serializeField($value, $serializationType) {
+ if ($value === NULL) {
+ return NULL;
+ }
+ switch ($serializationType) {
+ case self::SERIALIZE_SEPARATOR_BOOKEND:
+ return $value === array() ? '' : CRM_Utils_Array::implodePadded($value);
+
+ case self::SERIALIZE_SEPARATOR_TRIMMED:
+ return is_array($value) ? implode(self::VALUE_SEPARATOR, $value) : $value;
+
+ case self::SERIALIZE_COMMA:
+ return is_array($value) ? implode(',', $value) : $value;
+
+ case self::SERIALIZE_JSON:
+ return is_array($value) ? json_encode($value) : $value;
+
+ case self::SERIALIZE_PHP:
+ return is_array($value) ? serialize($value) : $value;
+ }
+ }
+
+ /**
+ * Transform a serialized string from the database into an array.
+ *
+ * @param string|null $value
+ * @param $serializationType
+ * @return array|null
+ */
+ public static function unSerializeField($value, $serializationType) {
+ if ($value === NULL) {
+ return NULL;
+ }
+ if ($value === '') {
+ return array();
+ }
+ switch ($serializationType) {
+ case self::SERIALIZE_SEPARATOR_BOOKEND:
+ return (array) CRM_Utils_Array::explodePadded($value);
+
+ case self::SERIALIZE_SEPARATOR_TRIMMED:
+ return explode(self::VALUE_SEPARATOR, trim($value));
+
+ case self::SERIALIZE_COMMA:
+ return explode(',', trim(str_replace(', ', '', $value)));
+
+ case self::SERIALIZE_JSON:
+ return strlen($value) ? json_decode($value, TRUE) : array();
+
+ case self::SERIALIZE_PHP:
+ return strlen($value) ? unserialize($value) : array();
+ }
+ }
+
}
*
* Generated from xml/schema/CRM/Core/CustomGroup.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:5b2dac3266e0184dc4eaa6de10c9d401)
+ * (GenCodeChecksum:4b960c311aed67174e9c55901ba3993b)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'CustomGroup',
'bao' => 'CRM_Core_BAO_CustomGroup',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_SEPARATOR_BOOKEND,
) ,
'style' => array(
'name' => 'style',
*
* Generated from xml/schema/CRM/Core/Domain.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:50edefeb24aa64d2125df018985cd701)
+ * (GenCodeChecksum:7bc078fa4adebf142c73c95fab321f25)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Domain Configuration') ,
'description' => 'Backend configuration.',
- 'rows' => 20,
- 'cols' => 80,
'table_name' => 'civicrm_domain',
'entity' => 'Domain',
'bao' => 'CRM_Core_BAO_Domain',
'localizable' => 0,
- 'html' => array(
- 'type' => 'TextArea',
- ) ,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
'version' => array(
'name' => 'version',
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Language Customizations') ,
'description' => 'Locale specific string overrides',
- 'rows' => 20,
- 'cols' => 80,
'table_name' => 'civicrm_domain',
'entity' => 'Domain',
'bao' => 'CRM_Core_BAO_Domain',
'localizable' => 0,
- 'html' => array(
- 'type' => 'TextArea',
- ) ,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
*
* Generated from xml/schema/CRM/Core/PrevNextCache.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:edf9dd4b38ca08a34dbc6990ac954af2)
+ * (GenCodeChecksum:cfce4435348e53ba9941ce5ed223c05b)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'PrevNextCache',
'bao' => 'CRM_Core_BAO_PrevNextCache',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
'is_selected' => array(
'name' => 'is_selected',
*
* Generated from xml/schema/CRM/Core/PrintLabel.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:af33d193b72fd8c8bf260c0625c7acf6)
+ * (GenCodeChecksum:60a1aaca1bbf19fe5b752afa03e8fd34)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'PrintLabel',
'bao' => 'CRM_Core_DAO_PrintLabel',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_JSON,
) ,
'is_default' => array(
'name' => 'is_default',
*
* Generated from xml/schema/CRM/Core/Setting.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a9b0b7aaf6ae42696ce402c1ff9acb89)
+ * (GenCodeChecksum:5aa73137509e3760555c0f3d1d746b05)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'Setting',
'bao' => 'CRM_Core_BAO_Setting',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
'domain_id' => array(
'name' => 'domain_id',
*
* Generated from xml/schema/CRM/Core/UFGroup.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:d87b52f7baf5aa4e4ccaf26c6e7acabc)
+ * (GenCodeChecksum:2c943baba637124caec29c4aefeb9228)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'UFGroup',
'bao' => 'CRM_Core_BAO_UFGroup',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
) ,
'title' => array(
'name' => 'title',
*
* Generated from xml/schema/CRM/Core/UFJoin.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:fde4a7125f1dd6d9e5081b534f151db6)
+ * (GenCodeChecksum:141d4903e67ac8bce639e3db9c7ba875)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'UFJoin',
'bao' => 'CRM_Core_BAO_UFJoin',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_JSON,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
*
* Generated from xml/schema/CRM/Event/Participant.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:89138cc7e79eac37b1b499084956428f)
+ * (GenCodeChecksum:444d0ee69773ce242341f8544e192087)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'Participant',
'bao' => 'CRM_Event_BAO_Participant',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
'html' => array(
'type' => 'Select',
) ,
'entity' => 'Participant',
'bao' => 'CRM_Event_BAO_Participant',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_SEPARATOR_BOOKEND,
) ,
'participant_is_test' => array(
'name' => 'is_test',
*
* Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:223b44e4b9e2994f724d2dbd79f575e4)
+ * (GenCodeChecksum:5a228384ec4b687a6961505b12d40512)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'PaymentProcessor',
'bao' => 'CRM_Financial_BAO_PaymentProcessor',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_JSON,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
*
* Generated from xml/schema/CRM/Member/MembershipBlock.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:3ee510fab11783acf6ee994f090436f6)
+ * (GenCodeChecksum:b99880f7b9c20c98f428dd694d8264ba)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'MembershipBlock',
'bao' => 'CRM_Member_BAO_MembershipBlock',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
'membership_type_default' => array(
'name' => 'membership_type_default',
*
* Generated from xml/schema/CRM/Pledge/PledgeBlock.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:27ee8365a58c51c15fcf0ae78b2f5f32)
+ * (GenCodeChecksum:630f1a7378136b8cc3edcd82a96279d6)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'PledgeBlock',
'bao' => 'CRM_Pledge_BAO_PledgeBlock',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_SEPARATOR_TRIMMED,
) ,
'is_pledge_interval' => array(
'name' => 'is_pledge_interval',
*
* Generated from xml/schema/CRM/Queue/QueueItem.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:6ca85e3a41502dda3e60a1c53a83c67f)
+ * (GenCodeChecksum:9049b4828c213985dea2180555f28568)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
*/
public $release_time;
/**
- * Serialized queue
+ * Serialized queue data
*
* @var text
*/
'data' => array(
'name' => 'data',
'type' => CRM_Utils_Type::T_TEXT,
- 'title' => ts('Queue item datas') ,
- 'description' => 'Serialized queue',
+ 'title' => ts('Queue item data') ,
+ 'description' => 'Serialized queue data',
'table_name' => 'civicrm_queue_item',
'entity' => 'QueueItem',
'bao' => 'CRM_Queue_BAO_QueueItem',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
);
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
*
* Generated from xml/schema/CRM/Report/ReportInstance.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:e28abdd2a3696c4a6072dfbfd4f54d68)
+ * (GenCodeChecksum:09ffdd1693f38f5790d4c9c00d3c5d2f)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
'entity' => 'ReportInstance',
'bao' => 'CRM_Report_BAO_ReportInstance',
'localizable' => 0,
+ 'serialize' => self::SERIALIZE_PHP,
) ,
'is_active' => array(
'name' => 'is_active',
}
}
+ /**
+ * @return array
+ */
+ public function serializationMethods() {
+ $constants = array();
+ $simpleData = array(
+ NULL,
+ array('Foo', 'Bar', '3', '4', '5'),
+ array(),
+ array('0'),
+ );
+ $complexData = array(
+ array(
+ 'foo' => 'bar',
+ 'baz' => array('1', '2', '3', array('one', 'two')),
+ '3' => '0',
+ ),
+ );
+ $daoInfo = new ReflectionClass('CRM_Core_DAO');
+ foreach ($daoInfo->getConstants() as $constant => $val) {
+ if ($constant == 'SERIALIZE_JSON' || $constant == 'SERIALIZE_PHP') {
+ $constants[] = array($val, array_merge($simpleData, $complexData));
+ }
+ elseif (strpos($constant, 'SERIALIZE_') === 0) {
+ $constants[] = array($val, $simpleData);
+ }
+ }
+ return $constants;
+ }
+
+ /**
+ * @dataProvider serializationMethods
+ */
+ public function testFieldSerialization($method, $sampleData) {
+ foreach ($sampleData as $value) {
+ $serialized = CRM_Core_DAO::serializeField($value, $method);
+ $newValue = CRM_Core_DAO::unSerializeField($serialized, $method);
+ $this->assertEquals($value, $newValue);
+ }
+ }
+
}
<type>Select</type>
<multiple>1</multiple>
</html>
+ <serialize>SEPARATOR_BOOKEND</serialize>
<add>1.5</add>
</field>
<index>
</pseudoconstant>
<html>
<type>Select</type>
+ <multiple>1</multiple>
</html>
+ <serialize>SEPARATOR_BOOKEND</serialize>
</field>
<index>
<name>index_preferred_communication_method</name>
<type>text</type>
<title>Tables For Select Clause</title>
<comment>the tables to be included in a select data</comment>
+ <serialize>PHP</serialize>
<add>1.6</add>
</field>
<field>
<type>text</type>
<title>Tables For Where Clause</title>
<comment>the tables to be included in the count statement</comment>
+ <serialize>PHP</serialize>
<add>1.6</add>
</field>
<field>
<pseudoconstant>
<optionGroupName>group_type</optionGroupName>
</pseudoconstant>
+ <serialize>SEPARATOR_BOOKEND</serialize>
<add>1.9</add>
</field>
<field>
<type>text</type>
<import>true</import>
<comment>Submitted form values for this search</comment>
+ <serialize>PHP</serialize>
<add>1.1</add>
</field>
<field>
<type>text</type>
<title>Select Tables</title>
<comment>the tables to be included in a select data</comment>
+ <serialize>PHP</serialize>
<add>1.6</add>
</field>
<field>
<type>text</type>
<title>Where Tables</title>
<comment>the tables to be included in the count statement</comment>
+ <serialize>PHP</serialize>
<add>1.6</add>
</field>
</table>
<type>varchar</type>
<length>128</length>
<comment>Supported recurring frequency units.</comment>
+ <pseudoconstant>
+ <optionGroupName>recur_frequency_units</optionGroupName>
+ <keyColumn>name</keyColumn>
+ </pseudoconstant>
+ <html>
+ <type>Select</type>
+ <multiple>1</multiple>
+ </html>
+ <serialize>SEPARATOR_TRIMMED</serialize>
<add>2.1</add>
</field>
<field>
<title>Custom Group Subtype</title>
<length>255</length>
<comment>linking custom group for dynamic object</comment>
+ <serialize>SEPARATOR_BOOKEND</serialize>
<add>1.6</add>
</field>
<field>
<type>text</type>
<title>Domain Configuration</title>
<comment>Backend configuration.</comment>
- <html>
- <type>TextArea</type>
- <rows>20</rows>
- <cols>80</cols>
- </html>
+ <serialize>PHP</serialize>
<add>1.6</add>
</field>
<field>
<type>text</type>
<title>Language Customizations</title>
<comment>Locale specific string overrides</comment>
- <html>
- <type>TextArea</type>
- <rows>20</rows>
- <cols>80</cols>
- </html>
+ <serialize>PHP</serialize>
<add>3.2</add>
</field>
</table>
<title>Prev Next Data</title>
<type>longtext</type>
<comment>cached snapshot of the serialized data</comment>
+ <serialize>PHP</serialize>
<add>3.4</add>
</field>
<field>
<type>longtext</type>
<comment>contains json encode configurations options</comment>
<add>4.4</add>
+ <serialize>JSON</serialize>
</field>
<field>
<name>is_default</name>
<name>value</name>
<type>text</type>
<comment>data associated with this group / name combo</comment>
+ <serialize>PHP</serialize>
<add>4.1</add>
</field>
<field>
<length>255</length>
<import>true</import>
<comment>This column will store a comma separated list of the type(s) of profile fields.</comment>
+ <serialize>SEPARATOR_TRIMMED</serialize>
<add>2.1</add>
</field>
<field>
<title>Profile Use Data</title>
<type>longtext</type>
<comment>Json serialized array of data used by the ufjoin.module</comment>
+ <serialize>JSON</serialize>
<add>4.5</add>
</field>
</table>
<name>options</name>
<type>text</type>
<comment>Options for the service (JSON)</comment>
+ <serialize>JSON</serialize>
<add>4.6</add>
</field>
</pseudoconstant>
<html>
<type>Select</type>
+ <multiple>1</multiple>
</html>
+ <serialize>SEPARATOR_TRIMMED</serialize>
<headerPattern>/(participant.)?(role)$/i</headerPattern>
<import>true</import>
<type>varchar</type>
<headerPattern>/^(f(ee\s)?level)$/i</headerPattern>
<type>text</type>
<import>true</import>
+ <serialize>SEPARATOR_BOOKEND</serialize>
<comment>Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that
we store the label value and not the key
</comment>
<type>text</type>
<default>NULL</default>
<comment>array of accepted credit card types</comment>
+ <serialize>JSON</serialize>
<add>4.7</add>
</field>
</table>
<type>varchar</type>
<length>1024</length>
<comment>Membership types to be exposed by this block</comment>
+ <serialize>PHP</serialize>
<add>1.5</add>
<!-- changed from varchar 255 to 1024 in 4.6 beta 2 -->
<change>4.6</change>
<type>varchar</type>
<length>128</length>
<comment>Delimited list of supported frequency units</comment>
+ <serialize>SEPARATOR_TRIMMED</serialize>
<add>2.1</add>
</field>
<field>
<field>
<name>data</name>
- <title>Queue item datas</title>
+ <title>Queue item data</title>
<type>text</type>
- <comment>Serialized queue</comment>
+ <comment>Serialized queue data</comment>
+ <serialize>PHP</serialize>
</field>
<index>
<name>index_queueids</name>
<type>text</type>
<import>true</import>
<comment>Submitted form values for this report</comment>
+ <serialize>PHP</serialize>
<add>2.2</add>
</field>
<field>
{if $field.FKClassName}
'FKClassName' => '{$field.FKClassName}',
-{/if} {* field.FKClassName *}
+{/if}
+{if $field.serialize}
+ 'serialize' => self::SERIALIZE_{$field.serialize|strtoupper},
+{/if}
{if $field.html}
{assign var=htmlOptions value=$field.html}
'html' => array(