__table = 'civicrm_wci_widget_cache'; parent::__construct(); } /** * return foreign keys and entity references * * @static * @access public * @return array of CRM_Core_EntityReference */ static function getReferenceColumns() { return self::$_links; } /** * returns all the column names of this table * * @access public * @return array */ static function &fields() { if (!(self::$_fields)) { self::$_fields = array( 'widget_cache_id' => array( 'name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('cahce Id', array('domain' => 'org.civicrm.wci')) , 'required' => true, ) , 'widget_id' => array( 'name' => 'widget_id', 'type' => CRM_Utils_Type::T_INT, 'required' => false, ) , 'widget_code' => array( 'name' => 'widget_code', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('widget code', array('domain' => 'org.civicrm.wci')) , 'required' => false, ) , 'ts' => array( 'name' => 'ts', 'type' => CRM_Utils_Type::T_TIMESTAMP, 'title' => ts('timestamp', array('domain' => 'org.civicrm.wci')) , 'required' => false, 'maxlength' => 64, ) , ); } return self::$_fields; } /** * Returns an array containing, for each field, the arary key used for that * field in self::$_fields. * * @access public * @return array */ static function &fieldKeys() { if (!(self::$_fieldKeys)) { self::$_fieldKeys = array( 'id' => 'widget_cache_id', 'widget_id' => 'widget_id', 'widget_code' => 'widget_code', 'ts' => 'ts', ); } return self::$_fieldKeys; } /** * returns the names of this table * * @access public * @static * @return string */ static function getTableName() { return self::$_tableName; } /** * returns if this table needs to be logged * * @access public * @return boolean */ function getLog() { return self::$_log; } /** * returns the list of fields that can be imported * * @access public * return array * @static */ static function &import($prefix = false) { if (!(self::$_import)) { self::$_import = array(); $fields = self::fields(); foreach($fields as $name => $field) { if (CRM_Utils_Array::value('import', $field)) { if ($prefix) { self::$_import['wci_progress_bar'] = & $fields[$name]; } else { self::$_import[$name] = & $fields[$name]; } } } } return self::$_import; } /** * returns the list of fields that can be exported * * @access public * return array * @static */ static function &export($prefix = false) { if (!(self::$_export)) { self::$_export = array(); $fields = self::fields(); foreach($fields as $name => $field) { if (CRM_Utils_Array::value('export', $field)) { if ($prefix) { self::$_export['wci_progress_bar'] = & $fields[$name]; } else { self::$_export[$name] = & $fields[$name]; } } } } return self::$_export; } }