mirror of
https://codeberg.org/artfulrobot/contactcats.git
synced 2025-06-25 18:18:05 +02:00
checkin (broken)
This commit is contained in:
parent
a01abba787
commit
06fec5daf7
21 changed files with 2025 additions and 376 deletions
|
@ -1,239 +1,24 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @package CRM
|
||||
* @copyright CiviCRM LLC https://civicrm.org/licensing
|
||||
* DAOs provide an OOP-style facade for reading and writing database records.
|
||||
*
|
||||
* Generated from contactcats/xml/schema/CRM/Contactcats/ContactCategory.xml
|
||||
* DO NOT EDIT. Generated by CRM_Core_CodeGen
|
||||
* (GenCodeChecksum:222d053743f68a2678d92b8a75b46316)
|
||||
* DAOs are a primary source for metadata in older versions of CiviCRM (<5.74)
|
||||
* and are required for some subsystems (such as APIv3).
|
||||
*
|
||||
* This stub provides compatibility. It is not intended to be modified in a
|
||||
* substantive way. Property annotations may be added, but are not required.
|
||||
* @property string $id
|
||||
* @property string $contact_id
|
||||
* @property string $category
|
||||
* @property string $next_category
|
||||
*/
|
||||
use CRM_Contactcats_ExtensionUtil as E;
|
||||
|
||||
/**
|
||||
* Database access object for the ContactCategory entity.
|
||||
*/
|
||||
class CRM_Contactcats_DAO_ContactCategory extends CRM_Core_DAO {
|
||||
const EXT = E::LONG_NAME;
|
||||
const TABLE_ADDED = '';
|
||||
class CRM_Contactcats_DAO_ContactCategory extends CRM_Contactcats_DAO_Base {
|
||||
|
||||
/**
|
||||
* Static instance to hold the table name.
|
||||
*
|
||||
* Required by older versions of CiviCRM (<5.74).
|
||||
* @var string
|
||||
*/
|
||||
public static $_tableName = 'civicrm_contact_category';
|
||||
|
||||
/**
|
||||
* Should CiviCRM log any modifications to this table in the civicrm_log table.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public static $_log = FALSE;
|
||||
|
||||
/**
|
||||
* Unique ID, corresponds to contact id
|
||||
*
|
||||
* @var int|string|null
|
||||
* (SQL type: int unsigned)
|
||||
* Note that values will be retrieved from the database as a string.
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* Same as id but for FormBuilder
|
||||
*
|
||||
* @var int|string
|
||||
* (SQL type: int unsigned)
|
||||
* Note that values will be retrieved from the database as a string.
|
||||
*/
|
||||
public $contact_id;
|
||||
|
||||
/**
|
||||
* @var int|string
|
||||
* (SQL type: int unsigned)
|
||||
* Note that values will be retrieved from the database as a string.
|
||||
*/
|
||||
public $category;
|
||||
|
||||
/**
|
||||
* @var int|string
|
||||
* (SQL type: int unsigned)
|
||||
* Note that values will be retrieved from the database as a string.
|
||||
*/
|
||||
public $next_category;
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->__table = 'civicrm_contact_category';
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns localized title of this entity.
|
||||
*
|
||||
* @param bool $plural
|
||||
* Whether to return the plural version of the title.
|
||||
*/
|
||||
public static function getEntityTitle($plural = FALSE) {
|
||||
return $plural ? E::ts('Contact Categories') : E::ts('Contact Category');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the column names of this table
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function &fields() {
|
||||
if (!isset(Civi::$statics[__CLASS__]['fields'])) {
|
||||
Civi::$statics[__CLASS__]['fields'] = [
|
||||
'id' => [
|
||||
'name' => 'id',
|
||||
'type' => CRM_Utils_Type::T_INT,
|
||||
'title' => E::ts('ID'),
|
||||
'description' => E::ts('Unique ID, corresponds to contact id'),
|
||||
'required' => TRUE,
|
||||
'usage' => [
|
||||
'import' => FALSE,
|
||||
'export' => FALSE,
|
||||
'duplicate_matching' => FALSE,
|
||||
'token' => FALSE,
|
||||
],
|
||||
'where' => 'civicrm_contact_category.id',
|
||||
'table_name' => 'civicrm_contact_category',
|
||||
'entity' => 'ContactCategory',
|
||||
'bao' => 'CRM_Contactcats_DAO_ContactCategory',
|
||||
'localizable' => 0,
|
||||
'html' => [
|
||||
'type' => 'Number',
|
||||
],
|
||||
'readonly' => TRUE,
|
||||
'add' => NULL,
|
||||
],
|
||||
'contact_id' => [
|
||||
'name' => 'contact_id',
|
||||
'type' => CRM_Utils_Type::T_INT,
|
||||
'title' => E::ts('Contact ID'),
|
||||
'description' => E::ts('Same as id but for FormBuilder'),
|
||||
'required' => TRUE,
|
||||
'usage' => [
|
||||
'import' => FALSE,
|
||||
'export' => FALSE,
|
||||
'duplicate_matching' => FALSE,
|
||||
'token' => FALSE,
|
||||
],
|
||||
'where' => 'civicrm_contact_category.contact_id',
|
||||
'table_name' => 'civicrm_contact_category',
|
||||
'entity' => 'ContactCategory',
|
||||
'bao' => 'CRM_Contactcats_DAO_ContactCategory',
|
||||
'localizable' => 0,
|
||||
'FKClassName' => 'CRM_Contact_DAO_Contact',
|
||||
'html' => [
|
||||
'type' => 'EntityRef',
|
||||
'label' => E::ts("Contact"),
|
||||
],
|
||||
'add' => NULL,
|
||||
],
|
||||
'category' => [
|
||||
'name' => 'category',
|
||||
'type' => CRM_Utils_Type::T_INT,
|
||||
'title' => E::ts('Category'),
|
||||
'required' => TRUE,
|
||||
'usage' => [
|
||||
'import' => FALSE,
|
||||
'export' => FALSE,
|
||||
'duplicate_matching' => FALSE,
|
||||
'token' => FALSE,
|
||||
],
|
||||
'where' => 'civicrm_contact_category.category',
|
||||
'default' => '0',
|
||||
'table_name' => 'civicrm_contact_category',
|
||||
'entity' => 'ContactCategory',
|
||||
'bao' => 'CRM_Contactcats_DAO_ContactCategory',
|
||||
'localizable' => 0,
|
||||
'html' => [
|
||||
'type' => 'Select',
|
||||
],
|
||||
'pseudoconstant' => [
|
||||
'optionGroupName' => 'contact_categories',
|
||||
'optionEditPath' => 'civicrm/admin/options/contact_categories',
|
||||
],
|
||||
'add' => NULL,
|
||||
],
|
||||
'next_category' => [
|
||||
'name' => 'next_category',
|
||||
'type' => CRM_Utils_Type::T_INT,
|
||||
'title' => E::ts('Next Category'),
|
||||
'required' => TRUE,
|
||||
'usage' => [
|
||||
'import' => FALSE,
|
||||
'export' => FALSE,
|
||||
'duplicate_matching' => FALSE,
|
||||
'token' => FALSE,
|
||||
],
|
||||
'where' => 'civicrm_contact_category.next_category',
|
||||
'default' => '0',
|
||||
'table_name' => 'civicrm_contact_category',
|
||||
'entity' => 'ContactCategory',
|
||||
'bao' => 'CRM_Contactcats_DAO_ContactCategory',
|
||||
'localizable' => 0,
|
||||
'pseudoconstant' => [
|
||||
'optionGroupName' => 'contact_categories',
|
||||
'optionEditPath' => 'civicrm/admin/options/contact_categories',
|
||||
],
|
||||
'add' => NULL,
|
||||
],
|
||||
];
|
||||
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
|
||||
}
|
||||
return Civi::$statics[__CLASS__]['fields'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of fields that can be imported
|
||||
*
|
||||
* @param bool $prefix
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function &import($prefix = FALSE) {
|
||||
$r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'contact_category', $prefix, []);
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of fields that can be exported
|
||||
*
|
||||
* @param bool $prefix
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function &export($prefix = FALSE) {
|
||||
$r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'contact_category', $prefix, []);
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of indices
|
||||
*
|
||||
* @param bool $localize
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function indices($localize = TRUE) {
|
||||
$indices = [
|
||||
'index_category' => [
|
||||
'name' => 'index_category',
|
||||
'field' => [
|
||||
0 => 'category',
|
||||
],
|
||||
'localizable' => FALSE,
|
||||
'sig' => 'civicrm_contact_category::0::category',
|
||||
],
|
||||
];
|
||||
return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
24
CRM/Contactcats/DAO/ContactCategoryDescription.php
Normal file
24
CRM/Contactcats/DAO/ContactCategoryDescription.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* DAOs provide an OOP-style facade for reading and writing database records.
|
||||
*
|
||||
* DAOs are a primary source for metadata in older versions of CiviCRM (<5.74)
|
||||
* and are required for some subsystems (such as APIv3).
|
||||
*
|
||||
* This stub provides compatibility. It is not intended to be modified in a
|
||||
* substantive way. Property annotations may be added, but are not required.
|
||||
* @property string $id
|
||||
* @property string $contact_id
|
||||
* @property string $category
|
||||
* @property string $next_category
|
||||
*/
|
||||
class CRM_Contactcats_DAO_ContactCategoryDescription extends CRM_Contactcats_DAO_Base {
|
||||
|
||||
/**
|
||||
* Required by older versions of CiviCRM (<5.74).
|
||||
* @var string
|
||||
*/
|
||||
public static $_tableName = 'civicrm_contact_category_description';
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue