Example #1
0
 /**
  * returns all the column names of this table
  *
  * @access public
  * @return array
  */
 function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'required' => true), 'entity_table' => array('name' => 'entity_table', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Entity Table'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'entity_id' => array('name' => 'entity_id', 'type' => CRM_Utils_Type::T_INT, 'required' => true), 'participant_discount_name' => array('name' => 'option_group_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Discount Name'), 'required' => true, 'export' => true, 'where' => 'civicrm_discount.option_group_id', 'headerPattern' => '', 'dataPattern' => '', 'FKClassName' => 'CRM_Core_DAO_OptionGroup'), 'start_date' => array('name' => 'start_date', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Start Date')), 'end_date' => array('name' => 'end_date', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('End Date')));
     }
     return self::$_fields;
 }
Example #2
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, 'description' => 'primary key', 'required' => true), 'entity_table' => array('name' => 'entity_table', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Entity Table'), 'description' => 'physical tablename for entity being joined to discount, e.g. civicrm_event', 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'entity_id' => array('name' => 'entity_id', 'type' => CRM_Utils_Type::T_INT, 'description' => 'FK to entity table specified in entity_table column.', 'required' => true), 'participant_discount_name' => array('name' => 'price_set_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Discount Name'), 'description' => 'FK to civicrm_price_set', 'required' => true, 'export' => true, 'where' => 'civicrm_discount.price_set_id', 'headerPattern' => '', 'dataPattern' => '', 'FKClassName' => 'CRM_Price_DAO_PriceSet'), 'start_date' => array('name' => 'start_date', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Start Date'), 'description' => 'Date when discount starts.'), 'end_date' => array('name' => 'end_date', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('End Date'), 'description' => 'Date when discount ends.'));
     }
     return self::$_fields;
 }