| @@ 454-456 (lines=3) @@ | ||
| 451 | ||
| 452 | //validate context |
|
| 453 | //valid context? |
|
| 454 | if ( !isset( $this->_contexts[$context] ) ) { |
|
| 455 | throw new EE_Error( sprintf( __('The context %s is not a valid context for %s.', 'event_espresso'), $context, get_class( $this ) ) ); |
|
| 456 | } |
|
| 457 | ||
| 458 | //valid sending_messenger? |
|
| 459 | $not_valid_msgr = FALSE; |
|
| @@ 493-495 (lines=3) @@ | ||
| 490 | */ |
|
| 491 | public function get_data_for_context( $context, EE_Registration $registration, $id = 0 ) { |
|
| 492 | //valid context? |
|
| 493 | if ( !isset( $this->_contexts[$context] ) ) { |
|
| 494 | throw new EE_Error( sprintf( __('The context %s is not a valid context for %s.', 'event_espresso'), $context, get_class( $this ) ) ); |
|
| 495 | } |
|
| 496 | ||
| 497 | //get data and apply global and class specific filters on it. |
|
| 498 | $data = apply_filters( 'FHEE__EE_message_type__get_data_for_context__data', $this->_get_data_for_context( $context, $registration, $id ), $this ); |
|
| @@ 3930-3932 (lines=3) @@ | ||
| 3927 | break; |
|
| 3928 | } |
|
| 3929 | } |
|
| 3930 | if( ! isset( $this->_cache_foreign_key_to_fields[ $model_name ] ) ){ |
|
| 3931 | throw new EE_Error(sprintf(__("There is no foreign key field pointing to model %s on model %s",'event_espresso'),$model_name,get_class($this))); |
|
| 3932 | } |
|
| 3933 | } |
|
| 3934 | return $this->_cache_foreign_key_to_fields[ $model_name ]; |
|
| 3935 | } |
|