diff --git a/CRM/Contactlayout/DAO/ContactLayout.php b/CRM/Contactlayout/DAO/ContactLayout.php index b671e0a..fb2fe9a 100644 --- a/CRM/Contactlayout/DAO/ContactLayout.php +++ b/CRM/Contactlayout/DAO/ContactLayout.php @@ -6,7 +6,7 @@ * * Generated from org.civicrm.contactlayout/xml/schema/CRM/Contactlayout/ContactLayout.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:b63665b0d24acdccb0da6c17ad580b43) + * (GenCodeChecksum:c73a4cc53d27905e0595be79b471e0a5) */ use CRM_Contactlayout_ExtensionUtil as E; @@ -24,6 +24,13 @@ class CRM_Contactlayout_DAO_ContactLayout extends CRM_Core_DAO { */ public static $_tableName = 'civicrm_contact_layout'; + /** + * Field to show when displaying a record. + * + * @var string + */ + public static $_labelField = 'label'; + /** * Should CiviCRM log any modifications to this table in the civicrm_log table. * @@ -34,7 +41,9 @@ class CRM_Contactlayout_DAO_ContactLayout extends CRM_Core_DAO { /** * Unique ContactLayout ID * - * @var int + * @var int|string|null + * (SQL type: int unsigned) + * Note that values will be retrieved from the database as a string. */ public $id; @@ -42,46 +51,60 @@ class CRM_Contactlayout_DAO_ContactLayout extends CRM_Core_DAO { * Name of this layout. * * @var string + * (SQL type: varchar(255)) + * Note that values will be retrieved from the database as a string. */ public $label; /** * The type of contacts this layout applies to. * - * @var string + * @var string|null + * (SQL type: varchar(255)) + * Note that values will be retrieved from the database as a string. */ public $contact_type; /** * The contacts subtypes this layout applies to. * - * @var string + * @var string|null + * (SQL type: varchar(255)) + * Note that values will be retrieved from the database as a string. */ public $contact_sub_type; /** * Show layout to users belonging to these groups. * - * @var string + * @var string|null + * (SQL type: varchar(255)) + * Note that values will be retrieved from the database as a string. */ public $groups; /** - * @var int + * @var int|string|null + * (SQL type: int) + * Note that values will be retrieved from the database as a string. */ public $weight; /** * Contains json encoded layout blocks. * - * @var longtext + * @var string + * (SQL type: longtext) + * Note that values will be retrieved from the database as a string. */ public $blocks; /** * Contains json encoded layout tabs. * - * @var longtext + * @var string|null + * (SQL type: longtext) + * Note that values will be retrieved from the database as a string. */ public $tabs; @@ -114,8 +137,15 @@ public static function &fields() { 'id' => [ 'name' => 'id', 'type' => CRM_Utils_Type::T_INT, + 'title' => E::ts('ID'), 'description' => E::ts('Unique ContactLayout ID'), 'required' => TRUE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_contact_layout.id', 'table_name' => 'civicrm_contact_layout', 'entity' => 'ContactLayout', @@ -132,6 +162,12 @@ public static function &fields() { 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_contact_layout.label', 'table_name' => 'civicrm_contact_layout', 'entity' => 'ContactLayout', @@ -149,6 +185,12 @@ public static function &fields() { 'description' => E::ts('The type of contacts this layout applies to.'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_contact_layout.contact_type', 'table_name' => 'civicrm_contact_layout', 'entity' => 'ContactLayout', @@ -172,6 +214,12 @@ public static function &fields() { 'description' => E::ts('The contacts subtypes this layout applies to.'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_contact_layout.contact_sub_type', 'table_name' => 'civicrm_contact_layout', 'entity' => 'ContactLayout', @@ -196,6 +244,12 @@ public static function &fields() { 'description' => E::ts('Show layout to users belonging to these groups.'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_contact_layout.groups', 'table_name' => 'civicrm_contact_layout', 'entity' => 'ContactLayout', @@ -216,6 +270,12 @@ public static function &fields() { 'name' => 'weight', 'type' => CRM_Utils_Type::T_INT, 'title' => E::ts('Order'), + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_contact_layout.weight', 'default' => '0', 'table_name' => 'civicrm_contact_layout', @@ -233,6 +293,12 @@ public static function &fields() { 'title' => E::ts('Blocks'), 'description' => E::ts('Contains json encoded layout blocks.'), 'required' => TRUE, + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_contact_layout.blocks', 'table_name' => 'civicrm_contact_layout', 'entity' => 'ContactLayout', @@ -246,6 +312,12 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_LONGTEXT, 'title' => E::ts('Tabs'), 'description' => E::ts('Contains json encoded layout tabs.'), + 'usage' => [ + 'import' => FALSE, + 'export' => FALSE, + 'duplicate_matching' => FALSE, + 'token' => FALSE, + ], 'where' => 'civicrm_contact_layout.tabs', 'table_name' => 'civicrm_contact_layout', 'entity' => 'ContactLayout', @@ -260,37 +332,6 @@ public static function &fields() { return Civi::$statics[__CLASS__]['fields']; } - /** - * Return a mapping from field-name to the corresponding key (as used in fields()). - * - * @return array - * Array(string $name => string $uniqueName). - */ - public static function &fieldKeys() { - if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { - Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); - } - return Civi::$statics[__CLASS__]['fieldKeys']; - } - - /** - * Returns the names of this table - * - * @return string - */ - public static function getTableName() { - return self::$_tableName; - } - - /** - * Returns if this table needs to be logged - * - * @return bool - */ - public function getLog() { - return self::$_log; - } - /** * Returns the list of fields that can be imported * diff --git a/sql/auto_uninstall.sql b/sql/auto_uninstall.sql index 14784c4..cc239e9 100644 --- a/sql/auto_uninstall.sql +++ b/sql/auto_uninstall.sql @@ -8,9 +8,11 @@ -- -- Generated from drop.tpl -- DO NOT EDIT. Generated by CRM_Core_CodeGen ----- /******************************************************* +-- +-- /******************************************************* +-- * +-- * Clean up the existing tables -- * --- * Clean up the existing tables-- * -- *******************************************************/ SET FOREIGN_KEY_CHECKS=0;