Exemplo n.º 1
0
 /**
  * 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('Price Field Value ID'), 'description' => 'Price Field Value', 'required' => true), 'price_field_id' => array('name' => 'price_field_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Price Field'), 'description' => 'FK to civicrm_price_field', 'required' => true, 'FKClassName' => 'CRM_Price_DAO_PriceField'), 'name' => array('name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Name'), 'description' => 'Price field option name', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'html' => array('type' => 'Text')), 'label' => array('name' => 'label', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Label'), 'description' => 'Price field option label', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'html' => array('type' => 'Text')), 'description' => array('name' => 'description', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Description'), 'description' => '>Price field option description.', 'rows' => 2, 'cols' => 60, 'default' => 'NULL', 'html' => array('type' => 'TextArea')), 'amount' => array('name' => 'amount', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Amount'), 'description' => 'Price field option amount', 'required' => true, 'maxlength' => 512, 'size' => CRM_Utils_Type::EIGHT, 'html' => array('type' => 'Text')), 'count' => array('name' => 'count', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Count'), 'description' => 'Number of participants per field option', 'default' => 'NULL', 'html' => array('type' => 'Text')), 'max_value' => array('name' => 'max_value', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Max Value'), 'description' => 'Max number of participants per field options', 'default' => 'NULL', 'html' => array('type' => 'Text')), 'weight' => array('name' => 'weight', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Order'), 'description' => 'Order in which the field options should appear', 'default' => '1', 'html' => array('type' => 'Text')), 'membership_type_id' => array('name' => 'membership_type_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Membership Type'), 'description' => 'FK to Membership Type', 'default' => 'NULL', 'FKClassName' => 'CRM_Member_DAO_MembershipType', 'html' => array('type' => 'Select')), 'membership_num_terms' => array('name' => 'membership_num_terms', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Membership Num Terms'), 'description' => 'Number of terms for this membership', 'default' => 'NULL', 'html' => array('type' => 'Text')), 'is_default' => array('name' => 'is_default', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Default Price Field Option?'), 'description' => 'Is this default price field option', 'html' => array('type' => 'CheckBox')), 'is_active' => array('name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Price Field Value is Active'), 'description' => 'Is this price field value active', 'default' => '1'), 'financial_type_id' => array('name' => 'financial_type_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Financial Type'), 'description' => 'FK to Financial Type.', 'default' => 'NULL', 'FKClassName' => 'CRM_Financial_DAO_FinancialType', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_financial_type', 'keyColumn' => 'id', 'labelColumn' => 'name')), 'deductible_amount' => array('name' => 'deductible_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Deductible Amount'), 'description' => 'Tax-deductible portion of the amount', 'required' => true, 'precision' => array(20, 2), 'default' => '0.0', 'html' => array('type' => 'Text')));
     }
     return self::$_fields;
 }
Exemplo n.º 2
0
 /**
  * returns all the column names of this table
  *
  * @access public
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'required' => true), 'price_field_id' => array('name' => 'price_field_id', 'type' => CRM_Utils_Type::T_INT, 'required' => true, 'FKClassName' => 'CRM_Price_DAO_PriceField'), 'name' => array('name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Name'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'label' => array('name' => 'label', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Label'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'description' => array('name' => 'description', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Description'), 'rows' => 2, 'cols' => 60, 'default' => 'NULL'), 'amount' => array('name' => 'amount', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Amount'), 'required' => true, 'maxlength' => 512, 'size' => CRM_Utils_Type::EIGHT), 'count' => array('name' => 'count', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Count'), 'default' => 'NULL'), 'max_value' => array('name' => 'max_value', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Max Value'), 'default' => 'NULL'), 'weight' => array('name' => 'weight', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Weight'), 'default' => '1'), 'membership_type_id' => array('name' => 'membership_type_id', 'type' => CRM_Utils_Type::T_INT, 'default' => 'NULL', 'FKClassName' => 'CRM_Member_DAO_MembershipType'), 'membership_num_terms' => array('name' => 'membership_num_terms', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Membership Num Terms'), 'default' => 'NULL'), 'is_default' => array('name' => 'is_default', 'type' => CRM_Utils_Type::T_BOOLEAN), 'is_active' => array('name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'default' => '1'), 'financial_type_id' => array('name' => 'financial_type_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Financial Type'), 'default' => 'NULL', 'FKClassName' => 'CRM_Financial_DAO_FinancialType'), 'deductible_amount' => array('name' => 'deductible_amount', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Deductible Amount'), 'required' => true, 'default' => '0.0'));
     }
     return self::$_fields;
 }