public function __construct()
 {
     add_filter('FHEE__EEM_Line_Item__line_items_can_be_for', array($this, 'register_promotion'));
     $this->_model_name_extended = 'Line_Item';
     $this->_extra_relations = array('Promotion' => new EE_Belongs_To_Any_Relation());
     parent::__construct();
 }
 function __construct()
 {
     $this->_model_name_extended = 'Attendee';
     $this->_extra_tables = array('New_Addon_Attendee_Meta' => new EE_Secondary_Table('esp_new_addon_attendee_meta', 'NATT_ID', 'ATT_ID'));
     $this->_extra_fields = array('New_Addon_Attendee_Meta' => array('NATT_ID' => new EE_DB_Only_Int_Field('NATT_ID', __('New Addon Attendee Meta Row ID', 'event_espresso'), false), 'NATT_ID_fk' => new EE_DB_Only_Int_Field('ATT_ID', __("Foreign Key to Attendee in Post Table", "event_espresso"), false), 'ATT_foobar' => new EE_Foreign_Key_Int_Field('ATT_foobar', __("Foobar", 'event_espresso'), true, 0, 'New_Addon_Thing')));
     $this->_extra_relations = array('New_Addon_Thing' => new EE_Belongs_To_Relation());
     parent::__construct();
 }
 /**
  * Override parent so we can add Person to object ID field without missing other foreign keys that might have been * added.
  *
  * @param array $existing_fields array of existing fields
  */
 public function add_extra_fields_on_filter($existing_fields)
 {
     $object_id_foreign_keys = $existing_fields['Term_Relationship']['object_id'] instanceof EE_Foreign_Key_Int_Field ? $existing_fields['Term_Relationship']['object_id']->get_model_names_pointed_to() : null;
     if (!empty($object_id_foreign_keys)) {
         $object_id_foreign_keys = (array) $object_id_foreign_keys;
         $object_id_foreign_keys[] = 'Person';
         $this->_extra_fields['Term_Relationship']['object_id'] = new EE_Foreign_Key_Int_Field('object_id', __('Object(Post) ID', 'event_espresso'), false, 0, $object_id_foreign_keys);
     }
     return parent::add_extra_fields_on_filter($existing_fields);
 }
 public function __construct()
 {
     $this->_model_name_extended = 'Event';
     $this->_extra_relations = array('Promotion_Object' => new EE_Has_Many_Any_Relation());
     parent::__construct();
 }
 function __construct()
 {
     $this->_model_name_extended = 'Event';
     $this->_extra_relations = array('Person' => new EE_HABTM_Relation('Person_Post'), 'Person_Post' => new EE_Has_Many_Relation());
     parent::__construct();
 }
 function __construct()
 {
     $this->_model_name_extended = 'Term_Taxonomy';
     $this->_extra_relations = array('Person' => new EE_HABTM_Relation('Term_Relationship'));
     parent::__construct();
 }
 function __construct()
 {
     $this->_model_name_extended = 'State';
     $this->_extra_relations = array('Person' => new EE_Has_Many_Relation());
     parent::__construct();
 }