Price field option description. * * @var text */ public $description; /** * Price field option amount * * @var string */ public $amount; /** * Number of participants per field option * * @var int unsigned */ public $count; /** * Max number of participants per field options * * @var int unsigned */ public $max_value; /** * Order in which the field options should appear * * @var int */ public $weight; /** * FK to Membership Type * * @var int unsigned */ public $membership_type_id; /** * Is this default price field option * * @var boolean */ public $is_default; /** * Is this price field value active * * @var boolean */ public $is_active; /** * Class constructor. * * @return \CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue */ public function __construct() { $this->__table = 'civicrm_price_field_value'; parent::__construct(); } /** * Return foreign links. * * @return array */ public function links() { if (!(self::$_links)) { self::$_links = array( 'price_field_id' => 'civicrm_price_field:id', 'membership_type_id' => 'civicrm_membership_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, ), 'price_field_id' => array( 'name' => 'price_field_id', 'type' => CRM_Utils_Type::T_INT, 'required' => TRUE, 'FKClassName' => 'Snapshot_v4p2_Price_DAO_Field', ), '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' => 'UL', ), 'amount' => array( 'name' => 'amount', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Amount'), 'required' => TRUE, 'maxlength' => 512, 'size' => CRM_Utils_Type::HUGE, ), 'count' => array( 'name' => 'count', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Count'), 'default' => 'UL', ), 'max_value' => array( 'name' => 'max_value', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Max Value'), 'default' => 'UL', ), 'weight' => array( 'name' => 'weight', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Weight'), 'default' => '', ), 'membership_type_id' => array( 'name' => 'membership_type_id', 'type' => CRM_Utils_Type::T_INT, 'default' => 'UL', 'FKClassName' => 'CRM_Member_DAO_MembershipType', ), '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' => '', ), ); } 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_field_value'] = &$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_field_value'] = &$fields[$name]; } else { self::$_export[$name] = &$fields[$name]; } } } } return self::$_export; } }