protected function __construct($timezone = NULL)
 {
     $this->singular_item = __('Term Taxonomy', 'event_espresso');
     $this->plural_item = __('Term Taxonomy', 'event_espresso');
     $this->_tables = array('Term_Taxonomy' => new EE_Primary_Table('term_taxonomy', 'term_taxonomy_id'));
     $this->_fields = array('Term_Taxonomy' => array('term_taxonomy_id' => new EE_Primary_Key_Int_Field('term_taxonomy_id', __('Term-Taxonomy ID', 'event_espresso')), 'term_id' => new EE_Foreign_Key_Int_Field('term_id', __("Term Id", "event_espresso"), false, 0, 'Term'), 'taxonomy' => new EE_Plain_Text_Field('taxonomy', __('Taxonomy Name', 'event_espresso'), false, 'category'), 'description' => new EE_Post_Content_Field('description', __("Description of Term", "event_espresso"), false, ''), 'parent' => new EE_Integer_Field('parent', __("Parent Term ID", "event_espresso"), false, 0), 'term_count' => new EE_Integer_Field('count', __("Count of Objects attached", 'event_espresso'), false, 0)));
     $this->_model_relations = array('Term_Relationship' => new EE_Has_Many_Relation(), 'Term' => new EE_Belongs_To_Relation());
     $cpt_models = array_keys(EE_Registry::instance()->cpt_models());
     foreach ($cpt_models as $model_name) {
         $this->_model_relations[$model_name] = new EE_HABTM_Relation('Term_Relationship');
     }
     $this->_indexes = array('term_id_taxonomy' => new EE_Unique_Index(array('term_id', 'taxonomy')));
     $path_to_tax_model = '';
     $this->_cap_restriction_generators[EEM_Base::caps_read] = new EE_Restriction_Generator_Public();
     $this->_cap_restriction_generators[EEM_Base::caps_read_admin] = new EE_Restriction_Generator_Taxonomy_Protected($path_to_tax_model);
     $this->_cap_restriction_generators[EEM_Base::caps_edit] = false;
     $this->_cap_restriction_generators[EEM_Base::caps_delete] = false;
     //add cap restrictions for editing relating to the "ee_edit_*"
     $this->_cap_restrictions[EEM_Base::caps_edit]['ee_edit_event_category'] = new EE_Default_Where_Conditions(array($path_to_tax_model . 'taxonomy*ee_edit_event_category' => array('!=', 'espresso_event_categories')));
     $this->_cap_restrictions[EEM_Base::caps_edit]['ee_edit_venue_category'] = new EE_Default_Where_Conditions(array($path_to_tax_model . 'taxonomy*ee_edit_venue_category' => array('!=', 'espresso_venue_categories')));
     $this->_cap_restrictions[EEM_Base::caps_edit]['ee_edit_event_type'] = new EE_Default_Where_Conditions(array($path_to_tax_model . 'taxonomy*ee_edit_event_type' => array('!=', 'espresso_event_type')));
     //add cap restrictions for deleting relating to the "ee_deleting_*"
     $this->_cap_restrictions[EEM_Base::caps_delete]['ee_delete_event_category'] = new EE_Default_Where_Conditions(array($path_to_tax_model . 'taxonomy*ee_delete_event_category' => array('!=', 'espresso_event_categories')));
     $this->_cap_restrictions[EEM_Base::caps_delete]['ee_delete_venue_category'] = new EE_Default_Where_Conditions(array($path_to_tax_model . 'taxonomy*ee_delete_venue_category' => array('!=', 'espresso_venue_categories')));
     $this->_cap_restrictions[EEM_Base::caps_delete]['ee_delete_event_type'] = new EE_Default_Where_Conditions(array($path_to_tax_model . 'taxonomy*ee_delete_event_type' => array('!=', 'espresso_event_type')));
     parent::__construct($timezone);
 }
 protected function __construct($timezone = null)
 {
     $this->_tables = array('New_Addon_Thing' => new EE_Primary_Table('esp_new_addon_thing', 'NEW_ID'));
     $this->_fields = array('New_Addon_Thing' => array('NEW_ID' => new EE_Primary_Key_Int_Field('NEW_ID', __("New Addon Thing ID", 'event_espresso')), 'NEW_name' => new EE_Plain_Text_Field('NEW_name', __('Name', 'event_espresso'), false), 'NEW_wp_user' => new EE_WP_User_Field('NEW_wp_user', __('Things Creator', 'event_espresso'), false)));
     $this->_model_relations = array('Attendee' => new EE_Has_Many_Relation(), 'WP_User' => new EE_Belongs_To_Relation());
     parent::__construct($timezone);
 }
 public function __construct($timezone = NULL)
 {
     $this->_tables = array('Person_Post' => new EE_Primary_Table('esp_people_to_post', 'PTP_ID'));
     $this->_fields = array('Person_Post' => array('PTP_ID' => new EE_Primary_Key_Int_Field('PTP_ID', __('Person to Event Link ID', 'event_espresso')), 'PER_ID' => new EE_Foreign_Key_Int_Field('PER_ID', __('Person Primary ID', 'event_espresso'), false, 0, 'Person'), 'OBJ_ID' => new EE_Foreign_Key_Int_Field('OBJ_ID', __('Event ID', 'event_espresso'), false, 0, array('Event')), 'OBJ_type' => new EE_Any_Foreign_Model_Name_Field('OBJ_type', __('Model Person Related to', 'event_espresso'), false, 'Event', array('Event')), 'PER_OBJ_order' => new EE_Integer_Field('P2P_Order', __('Person to Event Order', 'event_Espresso'), false, 0), 'PT_ID' => new EE_Foreign_Key_Int_Field('PT_ID', __('People Type ID', 'event_espresso'), false, 0, 'Term_Taxonomy')));
     $this->_model_relations = array('Person' => new EE_Belongs_To_Relation(), 'Event' => new EE_Belongs_To_Any_Relation(), 'Term_Taxonomy' => new EE_Belongs_to_Relation());
     parent::__construct();
 }
 protected function __construct($timezone = NULL)
 {
     $this->singular_item = __('Term Relationship', 'event_espresso');
     $this->plural_item = __('Term Relationships', 'event_espresso');
     $this->_tables = array('Term_Relationship' => new EE_Primary_Table('term_relationships'));
     $models_this_can_attach_to = array_keys(EE_Registry::instance()->cpt_models());
     $this->_fields = array('Term_Relationship' => array('object_id' => new EE_Foreign_Key_Int_Field('object_id', __('Object(Post) ID', 'event_espresso'), false, 0, $models_this_can_attach_to), 'term_taxonomy_id' => new EE_Foreign_Key_Int_Field('term_taxonomy_id', __('Term (in context of a taxonomy) ID', 'event_espresso'), false, 0, 'Term_Taxonomy'), 'term_order' => new EE_Integer_Field('term_order', __('Term Order', 'event_espresso'), false, 0)));
     $this->_model_relations = array('Term_Taxonomy' => new EE_Belongs_To_Relation());
     foreach ($models_this_can_attach_to as $model_name) {
         $this->_model_relations[$model_name] = new EE_Belongs_To_Relation();
     }
     $this->_indexes = array('PRIMARY' => new EE_Primary_Key_Index(array('object_id', 'term_taxonomy_id')));
     $path_to_event_model = 'Event.';
     $this->_cap_restriction_generators[EEM_Base::caps_read] = new EE_Restriction_Generator_Event_Related_Public($path_to_event_model);
     $this->_cap_restriction_generators[EEM_Base::caps_read_admin] = new EE_Restriction_Generator_Event_Related_Protected($path_to_event_model);
     $this->_cap_restriction_generators[EEM_Base::caps_edit] = new EE_Restriction_Generator_Event_Related_Protected($path_to_event_model);
     $this->_cap_restriction_generators[EEM_Base::caps_delete] = new EE_Restriction_Generator_Event_Related_Protected($path_to_event_model, EEM_Base::caps_edit);
     $path_to_tax_model = 'Term_Taxonomy.';
     //add cap restrictions for editing term relations to the "ee_assign_*"
     //and for deleting term relations too
     $cap_contexts_affected = array(EEM_Base::caps_edit, EEM_Base::caps_delete);
     foreach ($cap_contexts_affected as $cap_context_affected) {
         $this->_cap_restrictions[$cap_context_affected]['ee_assign_event_category'] = new EE_Default_Where_Conditions(array($path_to_tax_model . 'taxonomy*ee_assign_event_category' => array('!=', 'espresso_event_categories')));
         $this->_cap_restrictions[$cap_context_affected]['ee_assign_venue_category'] = new EE_Default_Where_Conditions(array($path_to_tax_model . 'taxonomy*ee_assign_venue_category' => array('!=', 'espresso_venue_categories')));
         $this->_cap_restrictions[$cap_context_affected]['ee_assign_event_type'] = new EE_Default_Where_Conditions(array($path_to_tax_model . 'taxonomy*ee_assign_event_type' => array('!=', 'espresso_event_type')));
     }
     parent::__construct($timezone);
 }
 /**
  * @param null $timezone
  */
 protected function __construct($timezone = NULL)
 {
     if (!$this->_default_where_conditions_strategy instanceof EE_Default_Where_Conditions) {
         $this->_default_where_conditions_strategy = new EE_Soft_Delete_Where_Conditions();
     }
     parent::__construct($timezone);
 }
 /**
  * @param null $timezone
  */
 protected function __construct($timezone = NULL)
 {
     require_once EE_MODELS . 'strategies/EE_Soft_Delete_Where_Conditions.strategy.php';
     if (!$this->_default_where_conditions_strategy) {
         $this->_default_where_conditions_strategy = new EE_Soft_Delete_Where_Conditions();
     }
     parent::__construct($timezone);
 }
 protected function __construct()
 {
     $this->singular_item = __('Event to Question Group Link', 'event_espresso');
     $this->plural_item = __('Event to Question Group Links', 'event_espresso');
     $this->_tables = array('Event_Question_Group' => new EE_Primary_Table('esp_event_question_group', 'EQG_ID'));
     $this->_fields = array('Event_Question_Group' => array('EQG_ID' => new EE_Primary_Key_Int_Field('EQG_ID', __('Event to Question Group Link ID', 'event_espresso')), 'EVT_ID' => new EE_Foreign_Key_Int_Field('EVT_ID', __('Event ID', 'event_espresso'), false, 0, 'Event'), 'QSG_ID' => new EE_Foreign_Key_Int_Field('QSG_ID', __('Question Group Id', 'event_espresso'), false, 0, 'Question_Group'), 'EQG_primary' => new EE_Boolean_Field('EQG_primary', __('Flag indicating question is only for primary attendees', 'event_espresso'), false, false)));
     $this->_model_relations = array('Event' => new EE_Belongs_To_Relation(), 'Question_Group' => new EE_Belongs_To_Relation());
     parent::__construct();
 }
 protected function __construct()
 {
     $this->singular_item = __('Question Group to Question Link', 'event_espresso');
     $this->plural_item = __('Question Group to Question Links', 'event_espresso');
     $this->_tables = array('Question_Group_Question' => new EE_Primary_Table('esp_question_group_question', 'QGQ_ID'));
     $this->_fields = array('Question_Group_Question' => array('QGQ_ID' => new EE_Primary_Key_Int_Field('QGQ_ID', __('Question Group to Question Link ID', 'event_espresso')), 'QSG_ID' => new EE_Foreign_Key_Int_Field('QSG_ID', __('Question Group ID', 'event_espresso'), false, 0, 'Question_Group'), 'QST_ID' => new EE_Foreign_Key_Int_Field('QST_ID', __('Question Id', 'event_espresso'), false, 0, 'Question'), 'QGQ_order' => new EE_Integer_Field('QGQ_order', __('Question Group Question Order', 'event_espresso'), false, 0)));
     $this->_model_relations = array('Question_Group' => new EE_Belongs_To_Relation(), 'Question' => new EE_Belongs_To_Relation());
     parent::__construct();
 }
Ejemplo n.º 9
0
 /**
  * @return EEM_Status
  */
 protected function __construct()
 {
     $this->singular_item = __('Status', 'event_espresso');
     $this->plural_item = __('Stati', 'event_espresso');
     $this->_tables = array('Status' => new EE_Primary_Table('esp_status', 'STS_ID'));
     $this->_fields = array('Status' => array('STS_ID' => new EE_Primary_Key_String_Field('STS_ID', __('Status ID', 'event_espresso')), 'STS_code' => new EE_Plain_Text_Field('STS_code', __('Status Code', 'event_espresso'), false, ''), 'STS_type' => new EE_Enum_Text_Field('STS_type', __("Type", "event_espresso"), false, 'event', array('event' => __("Event", "event_espresso"), 'registration' => __("Registration", "event_espresso"), 'transaction' => __("Transaction", "event_espresso"), 'payment' => __("Payment", "event_espresso"), 'email' => __("Email", "event_espresso"))), 'STS_can_edit' => new EE_Boolean_Field('STS_can_edit', __('Editable?', 'event_espresso'), false), 'STS_desc' => new EE_Simple_HTML_Field('STS_desc', __("Description", "event_espresso"), false, ''), 'STS_open' => new EE_Boolean_Field('STS_open', __("Open?", "event_espresso"), false, false)));
     $this->_model_relations = array('Registration' => new EE_Has_Many_Relation(), 'Transaction' => new EE_Has_Many_Relation(), 'Payment' => new EE_Has_Many_Relation());
     parent::__construct();
 }
Ejemplo n.º 10
0
 /**
  *		private constructor to prevent direct creation
  *		@Constructor
  *		@access protected
  *		@param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved).  Note this just sends the timezone info to the date time model field objects.  Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option)
  *		@return void
  */
 protected function __construct($timezone)
 {
     $this->singular_item = __('Payment', 'event_espresso');
     $this->plural_item = __('Payments', 'event_espresso');
     $this->_tables = array('Payment' => new EE_Primary_Table('esp_payment', 'PAY_ID'));
     $this->_fields = array('Payment' => array('PAY_ID' => new EE_Primary_Key_Int_Field('PAY_ID', __('Payment ID', 'event_espresso')), 'TXN_ID' => new EE_Foreign_Key_Int_Field('TXN_ID', __('Transaction ID', 'event_espresso'), false, 0, 'Transaction'), 'STS_ID' => new EE_Foreign_Key_String_Field('STS_ID', __('STatus ID', 'event_espresso'), false, EEM_Payment::status_id_cancelled, 'Status'), 'PAY_timestamp' => new EE_Datetime_Field('PAY_timestamp', __('Timestamp of when payment was attemped', 'event_espresso'), false, current_time('timestamp'), $timezone), 'PAY_method' => new EE_All_Caps_Text_Field('PAY_method', __('User-friendly description of payment', 'event_espresso'), false, 'CART'), 'PAY_amount' => new EE_Money_Field('PAY_amount', __('Amount Payment should be for', 'event_espresso'), false, 0), 'PAY_gateway' => new EE_Plain_Text_Field('PAY_gateway', __('Gateway name used for payment', 'event_espresso'), false, __('Unspecified', 'event_espresso')), 'PAY_gateway_response' => new EE_Plain_Text_Field('PAY_gateway_response', __('Response from Gateway about the payment', 'event_espresso'), false, ''), 'PAY_txn_id_chq_nmbr' => new EE_Plain_Text_Field('PAY_txn_id_chq_nmbr', __('Gateway Transaction ID or Cheque Number', 'event_espresso'), true, ''), 'PAY_po_number' => new EE_Plain_Text_Field('PAY_po_number', __('Purchase or Sales Number', 'event_espresso'), true, ''), 'PAY_extra_accntng' => new EE_Simple_HTML_Field('PAY_extra_accntng', __('Extra Account Info', 'event_espresso'), true, ''), 'PAY_via_admin' => new EE_Boolean_Field('PAY_via_admin', __('Whether payment made via admin', 'event_espresso'), false, false), 'PAY_details' => new EE_Serialized_Text_Field('PAY_details', __('Full Gateway response about payment', 'event_espresso'), true, '')));
     $this->_model_relations = array('Transaction' => new EE_Belongs_To_Relation(), 'Status' => new EE_Belongs_To_Relation());
     parent::__construct($timezone);
 }
Ejemplo n.º 11
0
 protected function __construct()
 {
     $this->singular_item = __('State/Province', 'event_espresso');
     $this->plural_item = __('States/Provinces', 'event_espresso');
     $this->_tables = array('State' => new EE_Primary_Table('esp_state', 'STA_ID'));
     $this->_fields = array('State' => array('STA_ID' => new EE_Primary_Key_Int_Field('STA_ID', __('State ID', 'event_espresso')), 'CNT_ISO' => new EE_Foreign_Key_String_Field('CNT_ISO', __('Country ISO Code', 'event_espresso'), false, NULL, 'Country'), 'STA_abbrev' => new EE_Plain_Text_Field('STA_abbrev', __('State Abbreviation', 'event_espresso'), false, ''), 'STA_name' => new EE_Plain_Text_Field('STA_name', __('State Name', 'event_espresso'), false, ''), 'STA_active' => new EE_Boolean_Field('STA_active', __("State Active Flag", "event_espresso"), false, false)));
     $this->_model_relations = array('Attendee' => new EE_Has_Many_Relation(), 'Country' => new EE_Belongs_To_Relation(), 'Venue' => new EE_Has_Many_Relation());
     parent::__construct();
 }
 protected function __construct()
 {
     $this->singular_item = __('Event to Question Group Link', 'event_espresso');
     $this->plural_item = __('Event to Question Group Links', 'event_espresso');
     $this->_tables = array('Event_Venue' => new EE_Primary_Table('esp_event_venue', 'EVV_ID'));
     $this->_fields = array('Event_Venue' => array('EVV_ID' => new EE_Primary_Key_Int_Field('EVV_ID', __('Event to Venue Link ID', 'event_espresso')), 'EVT_ID' => new EE_Foreign_Key_Int_Field('EVT_ID', __('Event ID', 'event_espresso'), false, 0, 'Event'), 'VNU_ID' => new EE_Foreign_Key_Int_Field('VNU_ID', __('Venue ID', 'event_espresso'), false, 0, 'Venue'), 'EVV_primary' => new EE_Boolean_Field('EVV_primary', __("Flag indicating venue is primary one for event", "event_espresso"), false, true)));
     $this->_model_relations = array('Event' => new EE_Belongs_To_Relation(), 'Venue' => new EE_Belongs_To_Relation());
     parent::__construct();
 }
 /**
  *		private constructor to prevent direct creation
  *		@Constructor
  *		@access private
  *		@param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved).  Note this just sends the timezone info to the date time model field objects.  Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option)
  *		@return void
  */
 protected function __construct($timezone)
 {
     $this->singular_item = __('Ticket Template', 'event_espresso');
     $this->plural_item = __('Ticket Templates', 'event_espresso');
     $this->_tables = array('Ticket_Template' => new EE_Primary_Table('esp_ticket_template', 'TTM_ID'));
     $this->_fields = array('Ticket_Template' => array('TTM_ID' => new EE_Primary_Key_Int_Field('TTM_ID', __('Ticket Template ID', 'event_espresso')), 'TTM_name' => new EE_Plain_Text_Field('TTM_name', __('The name of the ticket template', 'event_espresso'), false, ''), 'TTM_description' => new EE_Plain_Text_Field('TTM_description', __('The description for the ticket template', 'event_espresso'), true, ''), 'TTM_file' => new EE_Plain_Text_Field('TTM_file', __('The file name for the actual template file saved on disk', 'event_espresso'), true, '')));
     $this->_model_relations = array('Ticket' => new EE_Has_Many_Relation());
     parent::__construct($timezone);
 }
 /**
  *		private constructor to prevent direct creation
  *		@Constructor
  *		@access private
  *		@param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved).  Note this just sends the timezone info to the date time model field objects.  Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option)
  *		@return void
  */
 protected function __construct($timezone)
 {
     $this->singular_item = __('Datetime Ticket', 'event_espresso');
     $this->plural_item = __('Datetime Tickets', 'event_espresso');
     $this->_tables = array('Datetime_Ticket' => new EE_Primary_Table('esp_datetime_ticket', 'DTK_ID'));
     $this->_fields = array('Datetime_Ticket' => array('DTK_ID' => new EE_Primary_Key_Int_Field('DTK_ID', __('Datetime Ticket ID', 'event_espresso')), 'DTT_ID' => new EE_Foreign_Key_Int_Field('DTT_ID', __('The ID to the Datetime', 'event_espresso'), false, 0, 'Datetime'), 'TKT_ID' => new EE_Foreign_Key_Int_Field('TKT_ID', __('The ID to the Ticket', 'event_espresso'), false, 0, 'Ticket')));
     $this->_model_relations = array('Ticket' => new EE_Belongs_To_Relation(), 'Datetime' => new EE_Belongs_To_Relation());
     parent::__construct($timezone);
 }
Ejemplo n.º 15
0
 protected function __construct()
 {
     $this->singular_item = __('Country', 'event_espresso');
     $this->plural_item = __('Countries', 'event_espresso');
     $this->_tables = array('Country' => new EE_Primary_Table('esp_country', 'CNT_ISO'));
     $this->_fields = array('Country' => array('CNT_active' => new EE_Boolean_Field('CNT_active', __('Country Appears in Dropdown Select Lists', 'event_espresso'), false, true), 'CNT_ISO' => new EE_Primary_Key_String_Field('CNT_ISO', __('Country ISO Code', 'event_espresso')), 'CNT_ISO3' => new EE_All_Caps_Text_Field('CNT_ISO3', __('Country ISO3 Code', 'event_espresso'), false, ''), 'RGN_ID' => new EE_All_Caps_Text_Field('RGN_ID', __('Region ID', 'event_espresso'), false, 0), 'CNT_name' => new EE_Plain_Text_Field('CNT_name', __('Country Name', 'event_espresso'), false, ''), 'CNT_cur_code' => new EE_All_Caps_Text_Field('CNT_cur_code', __('Country Currency Code', 'event_espresso'), false), 'CNT_cur_single' => new EE_Plain_Text_Field('CNT_cur_single', __('Currency Name Singular', 'event_espresso'), false), 'CNT_cur_plural' => new EE_Plain_Text_Field('CNT_cur_plural', __('Currency Name Plural', 'event_espresso'), false), 'CNT_cur_sign' => new EE_Plain_Text_Field('CNT_cur_sign', __('Currency Sign', 'event_espresso'), false), 'CNT_cur_sign_b4' => new EE_Boolean_Field('CNT_cur_sign_b4', __('Currency Sign Before Number', 'event_espresso'), false, true), 'CNT_cur_dec_plc' => new EE_Integer_Field('CNT_cur_dec_plc', __('Currency Decimal Places', 'event_espresso'), false, 2), 'CNT_cur_dec_mrk' => new EE_Plain_Text_Field('CNT_cur_dec_mrk', __('Currency Decimal Mark', 'event_espresso'), false, '.'), 'CNT_cur_thsnds' => new EE_Plain_Text_Field('CNT_cur_thsnds', __('Currency Thousands Seperator', 'event_espresso'), false, ','), 'CNT_tel_code' => new EE_Plain_Text_Field('CNT_tel_code', __('Country Telephone Code', 'event_espresso'), false, ''), 'CNT_is_EU' => new EE_Boolean_Field('CNT_is_EU', __('Country is Member of EU', 'event_espresso'), false, false)));
     $this->_model_relations = array('Attendee' => new EE_Has_Many_Relation(), 'State' => new EE_Has_Many_Relation(), 'Venue' => new EE_Has_Many_Relation());
     parent::__construct();
 }
Ejemplo n.º 16
0
 /**
  * 	constructor
  */
 protected function __construct()
 {
     $this->singular_item = __('Answer', 'event_espresso');
     $this->plural_item = __('Answers', 'event_espresso');
     $this->_tables = array('Answer' => new EE_Primary_Table('esp_answer', 'ANS_ID'));
     $this->_fields = array('Answer' => array('ANS_ID' => new EE_Primary_Key_Int_Field('ANS_ID', __('Answer ID', 'event_espresso')), 'REG_ID' => new EE_Foreign_Key_Int_Field('REG_ID', __('Registration ID', 'event_espresso'), false, 0, 'Registration'), 'QST_ID' => new EE_Foreign_Key_Int_Field('QST_ID', __('Question ID', 'event_espresso'), false, 0, 'Question'), 'ANS_value' => new EE_Maybe_Serialized_Text_Field('ANS_value', __('Answer Value', 'event_espresso'), false, '')));
     $this->_model_relations = array('Registration' => new EE_Belongs_To_Relation(), 'Question' => new EE_Belongs_To_Relation());
     parent::__construct();
 }
Ejemplo n.º 17
0
 /**
  * 		private constructor to prevent direct creation
  * 		@Constructor
  * 		@access protected
  * 		@param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved).  Note this just sends the timezone info to the date time model field objects.  Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option)
  * 		@return void
  */
 protected function __construct($timezone)
 {
     $this->singular_item = __('Check-In', 'event_espresso');
     $this->plural_item = __('Check-Ins', 'event_espresso');
     $this->_tables = array('Checkin' => new EE_Primary_Table('esp_checkin', 'CHK_ID'));
     $this->_fields = array('Checkin' => array('CHK_ID' => new EE_Primary_Key_Int_Field('CHK_ID', 'Check-in ID'), 'REG_ID' => new EE_Foreign_Key_Int_Field('REG_ID', 'Registration Id', false, 0, 'Registration'), 'DTT_ID' => new EE_Foreign_Key_Int_Field('DTT_ID', 'Datetime Id', false, 0, 'Datetime'), 'CHK_in' => new EE_Boolean_Field('CHK_in', 'Whether a person has checked in or checked out', false, true), 'CHK_timestamp' => new EE_Datetime_Field('CHK_timestamp', __('When the row was modified', 'event_espresso'), false, current_time('timestamp'), $timezone)));
     $this->_model_relations = array('Registration' => new EE_Belongs_To_Relation(), 'Datetime' => new EE_Belongs_To_Relation());
     parent::__construct($timezone);
 }
 /**
  * 		private constructor to prevent direct creation
  * 		@Constructor
  * 		@access protected
  * 		@return void
  */
 protected function __construct()
 {
     $this->singular_item = __('Message Template', 'event_espresso');
     $this->plural_item = __('Message Templates', 'event_espresso');
     $this->_tables = array('Message_Template' => new EE_Primary_Table('esp_message_template', 'MTP_ID'));
     $this->_fields = array('Message_Template' => array('MTP_ID' => new EE_Primary_Key_Int_Field('MTP_ID', __('Message Template ID', 'event_espresso')), 'GRP_ID' => new EE_Foreign_Key_Int_Field('GRP_ID', __('Message Template Group ID', 'event_espresso'), FALSE, 0, 'Message_Template_Group'), 'MTP_template_field' => new EE_Plain_Text_Field('MTP_template_field', __('Field Name for this Template', 'event_espresso'), false, 'default'), 'MTP_context' => new EE_Plain_Text_Field('MTP_context', __('Message Type Context for this field', 'event_espresso'), false, 'admin'), 'MTP_content' => new EE_Serialized_Text_Field('MTP_content', __('The field content for the template', 'event_espresso'), false, '')));
     $this->_model_relations = array('Message_Template_Group' => new EE_Belongs_To_Relation());
     parent::__construct();
 }
 /**
  * private constructor to prevent direct creation
  * @Constructor
  * @access   protected
  * @return EEM_Payment_Method
  */
 protected function __construct($timezone = NULL)
 {
     $this->singlular_item = __('Payment Method', 'event_espresso');
     $this->plural_item = __('Payment Methods', 'event_espresso');
     $this->_tables = array('Payment_Method' => new EE_Primary_Table('esp_payment_method', 'PMD_ID'));
     $this->_fields = array('Payment_Method' => array('PMD_ID' => new EE_Primary_Key_Int_Field('PMD_ID', __("ID", 'event_espresso')), 'PMD_type' => new EE_Plain_Text_Field('PMD_type', __("Payment Method Type", 'event_espresso'), FALSE, 'Admin_Only'), 'PMD_name' => new EE_Plain_Text_Field('PMD_name', __("Name", 'event_espresso'), FALSE), 'PMD_desc' => new EE_Post_Content_Field('PMD_desc', __("Description", 'event_espresso'), FALSE, ''), 'PMD_admin_name' => new EE_Plain_Text_Field('PMD_admin_name', __("Admin-Only Name", 'event_espresso'), TRUE), 'PMD_admin_desc' => new EE_Post_Content_Field('PMD_admin_desc', __("Admin-Only Description", 'event_espresso'), TRUE), 'PMD_slug' => new EE_Slug_Field('PMD_slug', __("Slug", 'event_espresso'), FALSE), 'PMD_order' => new EE_Integer_Field('PMD_order', __("Order", 'event_espresso'), FALSE, 0), 'PMD_debug_mode' => new EE_Boolean_Field('PMD_debug_mode', __("Debug Mode On?", 'event_espresso'), FALSE, FALSE), 'PMD_wp_user' => new EE_WP_User_Field('PMD_wp_user', __("Payment Method Creator ID", 'event_espresso'), FALSE), 'PMD_open_by_default' => new EE_Boolean_Field('PMD_open_by_default', __("Open by Default?", 'event_espresso'), FALSE, FALSE), 'PMD_button_url' => new EE_Plain_Text_Field('PMD_button_url', __("Button URL", 'event_espresso'), TRUE, ''), 'PMD_scope' => new EE_Serialized_Text_Field('PMD_scope', __("Usable From?", 'event_espresso'), FALSE, array())));
     $this->_model_relations = array('Payment' => new EE_Has_Many_Relation(), 'Currency' => new EE_HABTM_Relation('Currency_Payment_Method'), 'Transaction' => new EE_Has_Many_Relation(), 'WP_User' => new EE_Belongs_To_Relation());
     parent::__construct($timezone);
 }
 /**
  * 		private constructor to prevent direct creation
  * 		@Constructor
  * 		@access protected
  * 		@param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved).  Note this just sends the timezone info to the date time model field objects.  Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option)
  * 		@return void
  */
 protected function __construct($timezone)
 {
     $this->singular_item = __('Ticket Price', 'event_espresso');
     $this->plural_item = __('Ticket Prices', 'event_espresso');
     $this->_tables = array('Ticket_Price' => new EE_Primary_Table('esp_ticket_price', 'TKP_ID'));
     $this->_fields = array('Ticket_Price' => array('TKP_ID' => new EE_Primary_Key_Int_Field('TKP_ID', 'Ticket Price ID'), 'TKT_ID' => new EE_Foreign_Key_Int_Field('TKT_ID', 'Ticket Id', false, 0, 'Ticket'), 'PRC_ID' => new EE_Foreign_Key_Int_Field('PRC_ID', 'Price ID', false, 0, 'Price')));
     $this->_model_relations = array('Ticket' => new EE_Belongs_To_Relation(), 'Price' => new EE_Belongs_To_Relation());
     parent::__construct($timezone);
 }
 /**
  *		private constructor to prevent direct creation
  *		@Constructor
  *		@access protected
  *		@param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved).  Note this just sends the timezone info to the date time model field objects.  Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option)
  *		@return void
  */
 protected function __construct($timezone)
 {
     $this->singular_item = __('Transaction', 'event_espresso');
     $this->plural_item = __('Transactions', 'event_espresso');
     $this->_tables = array('Transaction' => new EE_Primary_Table('esp_transaction', 'TXN_ID'));
     $this->_fields = array('Transaction' => array('TXN_ID' => new EE_Primary_Key_Int_Field('TXN_ID', __('Transaction ID', 'event_espresso')), 'TXN_timestamp' => new EE_Datetime_Field('TXN_timestamp', __('date when transaction was created', 'event_espresso'), false, current_time('timestamp'), $timezone), 'TXN_total' => new EE_Money_Field('TXN_total', __('Total value of Transaction', 'event_espresso'), false, 0), 'TXN_paid' => new EE_Money_Field('TXN_paid', __('Amount paid towards transaction to date', 'event_espresso'), false, 0), 'STS_ID' => new EE_Foreign_Key_String_Field('STS_ID', __('Status ID', 'event_espresso'), false, EEM_Transaction::incomplete_status_code, 'Status'), 'TXN_session_data' => new EE_Serialized_Text_Field('TXN_session_data', __('Serialized session data', 'event_espresso'), true, ''), 'TXN_hash_salt' => new EE_Plain_Text_Field('TXN_hash_salt', __('Transaction Hash Salt', 'event_espresso'), true, '')));
     $this->_model_relations = array('Registration' => new EE_Has_Many_Relation(), 'Payment' => new EE_Has_Many_Relation(), 'Status' => new EE_Belongs_To_Relation(), 'Line_Item' => new EE_Has_Many_Relation(false));
     parent::__construct($timezone);
 }
 protected function __construct($timezone = NULL)
 {
     $this->singular_item = __('Registration Payment', 'event_espresso');
     $this->plural_item = __('Registration Payments', 'event_espresso');
     $this->_tables = array('Registration_Payment' => new EE_Primary_Table('esp_registration_payment', 'RPY_ID'));
     $this->_fields = array('Registration_Payment' => array('RPY_ID' => new EE_Primary_Key_Int_Field('RPY_ID', __('Registration Payment ID', 'event_espresso')), 'REG_ID' => new EE_Foreign_Key_Int_Field('REG_ID', __('Registration ID', 'event_espresso'), false, 0, 'Registration'), 'PAY_ID' => new EE_Foreign_Key_Int_Field('PAY_ID', __('Payment ID', 'event_espresso'), true, null, 'Payment'), 'RPY_amount' => new EE_Money_Field('RPY_amount', __('Amount attributed to the registration', 'event_espresso'), false, 0)));
     $this->_model_relations = array('Registration' => new EE_Belongs_To_Relation(), 'Payment' => new EE_Belongs_To_Relation());
     parent::__construct($timezone);
 }
 /**
  * private constructor to prevent direct creation
  * @Constructor
  * @access private
  * @return void
  */
 protected function __construct()
 {
     $this->singlular_item = __('Event Message Template', 'event_espresso');
     $this->plural_item = __('Event Message Templates', 'event_espresso');
     $this->_tables = array('Event_Message_Template' => new EE_Primary_Table('esp_event_message_template', 'EMT_ID'));
     $this->_fields = array('Event_Message_Template' => array('EMT_ID' => new EE_Primary_Key_Int_Field('EMT_ID', __('Event Message Template ID', 'event_espresso')), 'EVT_ID' => new EE_Foreign_Key_Int_Field('EVT_ID', __('The ID to the Event', 'event_espresso'), false, 0, 'Event'), 'GRP_ID' => new EE_Foreign_Key_Int_Field('GRP_ID', __('The ID to the Message Template Group', 'event_espresso'), false, 0, 'Message_Template_Group')));
     $this->_model_relations = array('Event' => new EE_Belongs_To_Relation(), 'Message_Template_Group' => new EE_Belongs_To_Relation());
     parent::__construct();
 }
Ejemplo n.º 24
0
 /**
  *__construct
  */
 protected function __construct()
 {
     $this->singular_item = __('Term', 'event_espresso');
     $this->plural_item = __('Terms', 'event_espresso');
     $this->_tables = array('Term' => new EE_Primary_Table('terms', 'term_id'));
     $this->_fields = array('Term' => array('term_id' => new EE_Primary_Key_Int_Field('term_id', __('Term ID', 'event_espresso')), 'name' => new EE_Plain_Text_Field('name', __('Term Name', 'event_espresso'), false, ''), 'slug' => new EE_Slug_Field('slug', __('Term Slug', 'event_espresso'), false), 'term_group' => new EE_Integer_Field('term_group', __("Term Group", "event_espresso"), false, 0)));
     $this->_model_relations = array('Term_Taxonomy' => new EE_Has_Many_Relation());
     $this->_indexes = array('slug' => new EE_Unique_Index(array('slug')));
     parent::__construct();
 }
 /**
  * 	constructor
  * @return EEM_Promotion_Object
  */
 protected function __construct()
 {
     $this->singular_item = __('Status', 'event_espresso');
     $this->plural_item = __('Stati', 'event_espresso');
     $this->_tables = array('Promotion_Object' => new EE_Primary_Table('esp_promotion_object', 'POB_ID'));
     $relations = array('Event', 'Venue', 'Datetime', 'Ticket', 'Transaction');
     $this->_fields = array('Promotion_Object' => array('POB_ID' => new EE_Primary_Key_Int_Field('POB_ID', __("Price-to-Object ID", "event_espresso")), 'PRO_ID' => new EE_Foreign_Key_Int_Field('PRO_ID', __("Promotion Object", "event_espresso"), false, 0, 'Promotion'), 'OBJ_ID' => new EE_Foreign_Key_Int_Field('OBJ_ID', __("ID of the Related Object", "event_espresso"), false, 0, $relations), 'POB_type' => new EE_Any_Foreign_Model_Name_Field('POB_type', __("Model of Related Object", "event_espresso"), false, 'Event', $relations), 'POB_used' => new EE_Integer_Field('POB_used', __("Times the promotion has been used for this object", "event_espresso"), false, 0)));
     $this->_model_relations = array('Event' => new EE_Belongs_To_Any_Relation(), 'Venue' => new EE_Belongs_To_Any_Relation(), 'Datetime' => new EE_Belongs_To_Any_Relation(), 'Ticket' => new EE_Belongs_To_Any_Relation(), 'Transaction' => new EE_Belongs_To_Any_Relation(), 'Promotion' => new EE_Belongs_To_Relation());
     parent::__construct();
 }
 protected function __construct()
 {
     $this->singular_item = __('Term Taxonomy', 'event_espresso');
     $this->plural_item = __('Term Taxonomy', 'event_espresso');
     $this->_tables = array('Term_Taxonomy' => new EE_Primary_Table('term_taxonomy', 'term_taxonomy_id'));
     $this->_fields = array('Term_Taxonomy' => array('term_taxonomy_id' => new EE_Primary_Key_Int_Field('term_taxonomy_id', __('Term-Taxonomy ID', 'event_espresso')), 'term_id' => new EE_Foreign_Key_Int_Field('term_id', __("Term Id", "event_espresso"), false, 0, 'Term'), 'taxonomy' => new EE_Plain_Text_Field('taxonomy', __('Taxonomy Name', 'event_espresso'), false, 'category'), 'description' => new EE_Simple_HTML_Field('description', __("Description of Term", "event_espresso"), false, ''), 'parent' => new EE_Integer_Field('parent', __("Parent Term ID", "event_espresso"), false, 0), 'term_count' => new EE_Integer_Field('count', __("Count of Objects attached", 'event_espresso'), false, 0)));
     $this->_model_relations = array('Term_Relationship' => new EE_Has_Many_Relation(), 'Term' => new EE_Belongs_To_Relation(), 'Event' => new EE_HABTM_Relation('Term_Relationship'), 'Venue' => new EE_HABTM_Relation('Term_Relationship'), 'Attendee' => new EE_HABTM_Relation('Term_Relationship'));
     $this->_indexes = array('term_id_taxonomy' => new EE_Unique_Index(array('term_id', 'taxonomy')));
     parent::__construct();
 }
 /**
  *    private constructor to prevent direct creation
  *
  * @Constructor
  * @access protected
  * @param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved).
  *                         Note this just sends the timezone info to the date time model field objects.  Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option)
  * @return EEM_Transaction
  * @throws \EE_Error
  */
 protected function __construct($timezone)
 {
     $this->singular_item = __('Transaction', 'event_espresso');
     $this->plural_item = __('Transactions', 'event_espresso');
     $this->_tables = array('TransactionTable' => new EE_Primary_Table('esp_transaction', 'TXN_ID'));
     $this->_fields = array('TransactionTable' => array('TXN_ID' => new EE_Primary_Key_Int_Field('TXN_ID', __('Transaction ID', 'event_espresso')), 'TXN_timestamp' => new EE_Datetime_Field('TXN_timestamp', __('date when transaction was created', 'event_espresso'), false, time(), $timezone), 'TXN_total' => new EE_Money_Field('TXN_total', __('Total value of Transaction', 'event_espresso'), false, 0), 'TXN_paid' => new EE_Money_Field('TXN_paid', __('Amount paid towards transaction to date', 'event_espresso'), false, 0), 'STS_ID' => new EE_Foreign_Key_String_Field('STS_ID', __('Status ID', 'event_espresso'), false, EEM_Transaction::failed_status_code, 'Status'), 'TXN_session_data' => new EE_Serialized_Text_Field('TXN_session_data', __('Serialized session data', 'event_espresso'), true, ''), 'TXN_hash_salt' => new EE_Plain_Text_Field('TXN_hash_salt', __('Transaction Hash Salt', 'event_espresso'), true, ''), 'PMD_ID' => new EE_Foreign_Key_Int_Field('PMD_ID', __("Last Used Payment Method", 'event_espresso'), true, NULL, 'Payment_Method'), 'TXN_reg_steps' => new EE_Serialized_Text_Field('TXN_reg_steps', __('Registration Steps', 'event_espresso'), FALSE, array())));
     $this->_model_relations = array('Registration' => new EE_Has_Many_Relation(), 'Payment' => new EE_Has_Many_Relation(), 'Status' => new EE_Belongs_To_Relation(), 'Line_Item' => new EE_Has_Many_Relation(false), 'Payment_Method' => new EE_Belongs_To_Relation(), 'Message' => new EE_Has_Many_Relation());
     $this->_model_chain_to_wp_user = '******';
     parent::__construct($timezone);
 }
 protected function __construct()
 {
     $this->singular_item = __('Term Relationship', 'event_espresso');
     $this->plural_item = __('Term Relationships', 'event_espresso');
     $this->_tables = array('Term_Relationship' => new EE_Primary_Table('term_relationships'));
     $this->_fields = array('Term_Relationship' => array('object_id' => new EE_Foreign_Key_Int_Field('object_id', __('Object(Post) ID', 'event_espresso'), false, 0, array('Event', 'Venue', 'Attendee')), 'term_taxonomy_id' => new EE_Foreign_Key_Int_Field('term_taxonomy_id', __('Term (in context of a taxonomy) ID', 'event_espresso'), false, 0, 'Term_Taxonomy'), 'term_order' => new EE_Integer_Field('term_order', __('Term Order', 'event_espresso'), false, 0)));
     $this->_model_relations = array('Event' => new EE_Belongs_To_Relation(), 'Venue' => new EE_Belongs_To_Relation(), 'Attendee' => new EE_Belongs_To_Relation(), 'Term_Taxonomy' => new EE_Belongs_To_Relation());
     $this->_indexes = array('PRIMARY' => new EE_Primary_Key_Index(array('object_id', 'term_taxonomy_id')));
     parent::__construct();
 }
 /**
  * 	constructor
  */
 protected function __construct($timezone = NULL)
 {
     $this->singular_item = __('Answer', 'event_espresso');
     $this->plural_item = __('Answers', 'event_espresso');
     $this->_tables = array('Answer' => new EE_Primary_Table('esp_answer', 'ANS_ID'));
     $this->_fields = array('Answer' => array('ANS_ID' => new EE_Primary_Key_Int_Field('ANS_ID', __('Answer ID', 'event_espresso')), 'REG_ID' => new EE_Foreign_Key_Int_Field('REG_ID', __('Registration ID', 'event_espresso'), false, 0, 'Registration'), 'QST_ID' => new EE_Foreign_Key_Int_Field('QST_ID', __('Question ID', 'event_espresso'), false, 0, 'Question'), 'ANS_value' => new EE_Maybe_Serialized_Simple_HTML_Field('ANS_value', __('Answer Value', 'event_espresso'), false, '')));
     $this->_model_relations = array('Registration' => new EE_Belongs_To_Relation(), 'Question' => new EE_Belongs_To_Relation());
     $this->_model_chain_to_wp_user = '******';
     $this->_caps_slug = 'registrations';
     parent::__construct($timezone);
 }
 /**
  *		private constructor to prevent direct creation
  *		@Constructor
  *		@access protected
  *		@param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved).  Note this just sends the timezone info to the date time model field objects.  Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option)
  *		@return EEM_Payment
  */
 protected function __construct($timezone)
 {
     $this->singular_item = __('Payment', 'event_espresso');
     $this->plural_item = __('Payments', 'event_espresso');
     $this->_tables = array('Payment' => new EE_Primary_Table('esp_payment', 'PAY_ID'));
     $this->_fields = array('Payment' => array('PAY_ID' => new EE_Primary_Key_Int_Field('PAY_ID', __('Payment ID', 'event_espresso')), 'TXN_ID' => new EE_Foreign_Key_Int_Field('TXN_ID', __('Transaction ID', 'event_espresso'), false, 0, 'Transaction'), 'STS_ID' => new EE_Foreign_Key_String_Field('STS_ID', __('Status ID', 'event_espresso'), false, EEM_Payment::status_id_failed, 'Status'), 'PAY_timestamp' => new EE_Datetime_Field('PAY_timestamp', __('Timestamp of when payment was attempted', 'event_espresso'), false, current_time('timestamp'), $timezone), 'PAY_source' => new EE_All_Caps_Text_Field('PAY_source', __('User-friendly description of payment', 'event_espresso'), false, 'CART'), 'PAY_amount' => new EE_Money_Field('PAY_amount', __('Amount Payment should be for', 'event_espresso'), false, 0), 'PMD_ID' => new EE_Foreign_Key_Int_Field('PMD_ID', __("Payment Method ID", 'event_espresso'), false, NULL, 'Payment_Method'), 'PAY_gateway_response' => new EE_Plain_Text_Field('PAY_gateway_response', __('Response from Gateway about the payment', 'event_espresso'), false, ''), 'PAY_txn_id_chq_nmbr' => new EE_Plain_Text_Field('PAY_txn_id_chq_nmbr', __('Gateway Transaction ID or Cheque Number', 'event_espresso'), true, ''), 'PAY_po_number' => new EE_Plain_Text_Field('PAY_po_number', __('Purchase or Sales Number', 'event_espresso'), true, ''), 'PAY_extra_accntng' => new EE_Simple_HTML_Field('PAY_extra_accntng', __('Extra Account Info', 'event_espresso'), true, ''), 'PAY_details' => new EE_Serialized_Text_Field('PAY_details', __('Full Gateway response about payment', 'event_espresso'), true, ''), 'PAY_redirect_url' => new EE_Plain_Text_Field('PAY_redirect_url', __("Redirect URL", 'event_espresso'), true), 'PAY_redirect_args' => new EE_Serialized_Text_Field('PAY_redirect_args', __("Key-Value POST vars to send along with redirect", 'event_espresso'), true)));
     $this->_model_relations = array('Transaction' => new EE_Belongs_To_Relation(), 'Status' => new EE_Belongs_To_Relation(), 'Payment_Method' => new EE_Belongs_To_Relation(), 'Registration' => new EE_HABTM_Relation('Registration_Payment'));
     $this->_model_chain_to_wp_user = '******';
     $this->_caps_slug = 'transactions';
     parent::__construct($timezone);
 }