| @@ 413-415 (lines=3) @@ | ||
| 410 | ||
| 411 | //validate context |
|
| 412 | //valid context? |
|
| 413 | if ( !isset( $this->_contexts[$context] ) ) { |
|
| 414 | throw new EE_Error( sprintf( __('The context %s is not a valid context for %s.', 'event_espresso'), $context, get_class( $this ) ) ); |
|
| 415 | } |
|
| 416 | ||
| 417 | //valid sending_messenger? |
|
| 418 | $not_valid_msgr = FALSE; |
|
| @@ 453-455 (lines=3) @@ | ||
| 450 | */ |
|
| 451 | public function get_data_for_context( $context, EE_Registration $registration, $id = 0 ) { |
|
| 452 | //valid context? |
|
| 453 | if ( !isset( $this->_contexts[$context] ) ) { |
|
| 454 | throw new EE_Error( sprintf( __('The context %s is not a valid context for %s.', 'event_espresso'), $context, get_class( $this ) ) ); |
|
| 455 | } |
|
| 456 | ||
| 457 | //get data and apply global and class specific filters on it. |
|
| 458 | $data = apply_filters( 'FHEE__EE_message_type__get_data_for_context__data', $this->_get_data_for_context( $context, $registration, $id ), $this ); |
|
| @@ 3662-3664 (lines=3) @@ | ||
| 3659 | } |
|
| 3660 | } |
|
| 3661 | } |
|
| 3662 | if( ! isset( $this->_cache_foreign_key_to_fields[ $model_name ] ) ){ |
|
| 3663 | 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))); |
|
| 3664 | } |
|
| 3665 | } |
|
| 3666 | return $this->_cache_foreign_key_to_fields[ $model_name ]; |
|
| 3667 | } |
|