diff --git a/CRM/Contactlayout/DAO/ContactLayout.php b/CRM/Contactlayout/DAO/ContactLayout.php
index bf93493..34a2ada 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:7f1bfe25818886033ab1f98048b27597)
+ * (GenCodeChecksum:848b8019232be595fd9d48431cd6fff2)
*/
/**
@@ -75,6 +75,13 @@ class CRM_Contactlayout_DAO_ContactLayout extends CRM_Core_DAO {
*/
public $blocks;
+ /**
+ * Contains json encoded layout tabs.
+ *
+ * @var longtext
+ */
+ public $tabs;
+
/**
* Class constructor.
*/
@@ -185,6 +192,7 @@ public static function &fields() {
'name' => 'weight',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Order'),
+ 'default' => '0',
'table_name' => 'civicrm_contact_layout',
'entity' => 'ContactLayout',
'bao' => 'CRM_Contactlayout_DAO_ContactLayout',
@@ -205,6 +213,18 @@ public static function &fields() {
'localizable' => 0,
'serialize' => self::SERIALIZE_JSON,
],
+ 'tabs' => [
+ 'name' => 'tabs',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Tabs'),
+ 'description' => 'Contains json encoded layout tabs.',
+ 'required' => TRUE,
+ 'table_name' => 'civicrm_contact_layout',
+ 'entity' => 'ContactLayout',
+ 'bao' => 'CRM_Contactlayout_DAO_ContactLayout',
+ 'localizable' => 0,
+ 'serialize' => self::SERIALIZE_JSON,
+ ],
];
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
diff --git a/CRM/Contactlayout/Upgrader.php b/CRM/Contactlayout/Upgrader.php
index 8d1b442..f30cf87 100644
--- a/CRM/Contactlayout/Upgrader.php
+++ b/CRM/Contactlayout/Upgrader.php
@@ -87,6 +87,18 @@ public function upgrade_1000() {
return TRUE;
}
+ /**
+ * Add support for tabs.
+ *
+ * @return TRUE on success
+ * @throws Exception
+ */
+ public function upgrade_1001() {
+ $this->ctx->log->info('Applying update 1001 - Add support for tabs.');
+ CRM_Core_DAO::executeQuery("ALTER TABLE `civicrm_contact_layout` ADD COLUMN `tabs` longtext NOT NULL COMMENT 'Contains json encoded layout tabs.'");
+ return TRUE;
+ }
+
/**
* Example: Run an external SQL script.
diff --git a/sql/auto_install.sql b/sql/auto_install.sql
index 8979a63..cafa16f 100644
--- a/sql/auto_install.sql
+++ b/sql/auto_install.sql
@@ -87,7 +87,8 @@ CREATE TABLE `civicrm_contact_layout` (
`contact_sub_type` varchar(255) COMMENT 'The contacts subtypes this layout applies to.',
`groups` varchar(255) COMMENT 'Show layout to users belonging to these groups.',
`weight` int DEFAULT 0 ,
- `blocks` longtext NOT NULL COMMENT 'Contains json encoded layout blocks.'
+ `blocks` longtext NOT NULL COMMENT 'Contains json encoded layout blocks.',
+ `tabs` longtext NOT NULL COMMENT 'Contains json encoded layout tabs.'
,
PRIMARY KEY (`id`)
diff --git a/xml/schema/CRM/Contactlayout/ContactLayout.xml b/xml/schema/CRM/Contactlayout/ContactLayout.xml
index ebe9c47..a6e64a9 100644
--- a/xml/schema/CRM/Contactlayout/ContactLayout.xml
+++ b/xml/schema/CRM/Contactlayout/ContactLayout.xml
@@ -110,4 +110,13 @@
true
+
+ tabs
+ longtext
+ Contains json encoded layout tabs.
+ 1.2
+ JSON
+ true
+
+