__table = 'civicrm_cxn'; parent::__construct(); } /** * 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('Connection ID') , 'description' => 'Connection ID', 'required' => true, ) , 'app_guid' => array( 'name' => 'app_guid', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Application GUID') , 'description' => 'Application GUID', 'maxlength' => 128, 'size' => CRM_Utils_Type::HUGE, ) , 'app_meta' => array( 'name' => 'app_meta', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Application Metadata (JSON)') , 'description' => 'Application Metadata (JSON)', ) , 'cxn_guid' => array( 'name' => 'cxn_guid', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Connection GUID') , 'description' => 'Connection GUID', 'maxlength' => 128, 'size' => CRM_Utils_Type::HUGE, ) , 'secret' => array( 'name' => 'secret', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Secret') , 'description' => 'Shared secret', ) , 'perm' => array( 'name' => 'perm', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Perm') , 'description' => 'Permissions approved for the service (JSON)', ) , 'options' => array( 'name' => 'options', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Options') , 'description' => 'Options for the service (JSON)', ) , 'is_active' => array( 'name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Active') , 'description' => 'Is connection currently enabled?', 'default' => '1', ) , 'created_date' => array( 'name' => 'created_date', 'type' => CRM_Utils_Type::T_TIMESTAMP, 'title' => ts('Created Date') , 'description' => 'When was the connection was created.', 'required' => false, 'default' => 'NULL', ) , 'modified_date' => array( 'name' => 'modified_date', 'type' => CRM_Utils_Type::T_TIMESTAMP, 'title' => ts('Modified Date') , 'description' => 'When the connection was created or modified.', 'required' => false, 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', ) , 'fetched_date' => array( 'name' => 'fetched_date', 'type' => CRM_Utils_Type::T_TIMESTAMP, 'title' => ts('Fetched Date') , 'description' => 'The last time the application metadata was fetched.', 'required' => false, 'default' => 'NULL', ) , ); } 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', 'app_guid' => 'app_guid', 'app_meta' => 'app_meta', 'cxn_guid' => 'cxn_guid', 'secret' => 'secret', 'perm' => 'perm', 'options' => 'options', 'is_active' => 'is_active', 'created_date' => 'created_date', 'modified_date' => 'modified_date', 'fetched_date' => 'fetched_date', ); } 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__, 'cxn', $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__, 'cxn', $prefix, array()); return $r; } }