__table = 'civicrm_domain'; parent::__construct(); } /** * Returns foreign keys and entity references * * @return array * [CRM_Core_Reference_Interface] */ static function getReferenceColumns() { if (!self::$_links) { self::$_links = static ::createReferenceColumns(__CLASS__); self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id'); } return self::$_links; } /** * Returns all the column names of this table * * @return array */ static function &fields() { if (!(self::$_fields)) { self::$_fields = array( 'id' => array( 'name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Domain ID') , 'description' => 'Domain ID', 'required' => true, ) , 'name' => array( 'name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Domain Name') , 'description' => 'Name of Domain / Organization', 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'html' => array( 'type' => 'Text', ) , ) , 'description' => array( 'name' => 'description', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Domain Description') , 'description' => 'Description of Domain.', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'html' => array( 'type' => 'Text', ) , ) , 'config_backend' => array( 'name' => 'config_backend', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Domain Configuration') , 'description' => 'Backend configuration.', 'rows' => 20, 'cols' => 80, 'html' => array( 'type' => 'TextArea', ) , ) , 'version' => array( 'name' => 'version', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('CiviCRM Version') , 'description' => 'The civicrm version this instance is running', 'maxlength' => 32, 'size' => CRM_Utils_Type::MEDIUM, ) , 'contact_id' => array( 'name' => 'contact_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Domain Contact') , 'description' => 'FK to Contact ID. This is specifically not an FK to avoid circular constraints', 'FKClassName' => 'CRM_Contact_DAO_Contact', ) , 'locales' => array( 'name' => 'locales', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Supported Languages') , 'description' => 'list of locales supported by the current db state (NULL for single-lang install)', ) , 'locale_custom_strings' => array( 'name' => 'locale_custom_strings', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Language Customizations') , 'description' => 'Locale specific string overrides', 'rows' => 20, 'cols' => 80, 'html' => array( 'type' => 'TextArea', ) , ) , ); } return self::$_fields; } /** * Returns an array containing, for each field, the arary key used for that * field in self::$_fields. * * @return array */ static function &fieldKeys() { if (!(self::$_fieldKeys)) { self::$_fieldKeys = array( 'id' => 'id', 'name' => 'name', 'description' => 'description', 'config_backend' => 'config_backend', 'version' => 'version', 'contact_id' => 'contact_id', 'locales' => 'locales', 'locale_custom_strings' => 'locale_custom_strings', ); } return self::$_fieldKeys; } /** * Returns the names of this table * * @return string */ static function getTableName() { return self::$_tableName; } /** * Returns if this table needs to be logged * * @return boolean */ function getLog() { return self::$_log; } /** * Returns the list of fields that can be imported * * @param bool $prefix * * @return array */ static function &import($prefix = false) { $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'domain', $prefix, array()); return $r; } /** * Returns the list of fields that can be exported * * @param bool $prefix * * @return array */ static function &export($prefix = false) { $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'domain', $prefix, array()); return $r; } }