Skip to content

Commit

Permalink
Regenerate entity-boilerplate with latest civix
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Dec 21, 2023
1 parent 9f96526 commit 895f1d9
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 41 deletions.
119 changes: 80 additions & 39 deletions CRM/Contactlayout/DAO/ContactLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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.
*
Expand All @@ -34,54 +41,70 @@ 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;

/**
* 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;

Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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
*
Expand Down
6 changes: 4 additions & 2 deletions sql/auto_uninstall.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 895f1d9

Please sign in to comment.