__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, ], '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' => 'ContactCategories', 'optionEditPath' => 'civicrm/admin/options/ContactCategories', ], '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' => 'ContactCategories', 'optionEditPath' => 'civicrm/admin/options/ContactCategories', ], '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 = []; return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; } }