__table = 'civicrm_price_set'; parent::__construct(); } /** * Return foreign links. * * @return array */ public function links() { if (!(self::$_links)) { self::$_links = array( 'domain_id' => 'civicrm_domain:id', 'contribution_type_id' => 'civicrm_contribution_type: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, 'required' => TRUE, ), 'domain_id' => array( 'name' => 'domain_id', 'type' => CRM_Utils_Type::T_INT, 'FKClassName' => 'CRM_Core_DAO_Domain', ), 'name' => array( 'name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Name'), 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, ), 'title' => array( 'name' => 'title', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Title'), 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, ), 'is_active' => array( 'name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'default' => '', ), 'help_pre' => array( 'name' => 'help_pre', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Help Pre'), 'rows' => 4, 'cols' => 80, ), 'help_post' => array( 'name' => 'help_post', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Help Post'), 'rows' => 4, 'cols' => 80, ), 'javascript' => array( 'name' => 'javascript', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Javascript'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, ), 'extends' => array( 'name' => 'extends', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Extends'), 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, ), 'contribution_type_id' => array( 'name' => 'contribution_type_id', 'type' => CRM_Utils_Type::T_INT, 'default' => 'UL', 'FKClassName' => 'CRM_Contribute_DAO_ContributionType', ), 'is_quick_config' => array( 'name' => 'is_quick_config', 'type' => CRM_Utils_Type::T_BOOLEAN, ), 'is_reserved' => array( 'name' => 'is_reserved', 'type' => CRM_Utils_Type::T_BOOLEAN, ), ); } return self::$_fields; } /** * returns the names of this table. * * @return string */ public static function getTableName() { return CRM_Core_DAO::getLocaleTableName(self::$_tableName); } /** * returns if this table needs to be logged. * * @return boolean */ public function getLog() { return self::$_log; } /** * returns the list of fields that can be imported. * * @return array */ static function &import($prefix = FALSE) { if (!(self::$_import)) { self::$_import = array(); $fields = self::fields(); foreach ($fields as $name => $field) { if (!empty($field['import'])) { if ($prefix) { self::$_import['price_set'] = &$fields[$name]; } else { self::$_import[$name] = &$fields[$name]; } } } } return self::$_import; } /** * returns the list of fields that can be exported. * * @return array */ static function &export($prefix = FALSE) { if (!(self::$_export)) { self::$_export = array(); $fields = self::fields(); foreach ($fields as $name => $field) { if (!empty($field['export'])) { if ($prefix) { self::$_export['price_set'] = &$fields[$name]; } else { self::$_export[$name] = &$fields[$name]; } } } } return self::$_export; } }